private void Compile(bool end) { if (IsDisposed) { return; } WriteStart(); if (CurrentNode.Count > 0) { var json = Json.Encode(CurrentNode); if (_ObjectID++ > 0) { json = ", " + json; } var buffer = Encoding.GetBytes(json); BaseStream.Write(buffer, 0, buffer.Length); CurrentNode.Clear(); } if (end) { WriteEnd(); } BaseStream.Flush(); }