/// <summary> /// Asynchronously write end of either object or array to JSON output. /// </summary> /// <param name="segment">Label or Counter object.</param> private async Task WriteEndBracketToJsonAsync(LorC segment) { if (segment.IsLabel) { await _jsonWriter.WriteEndObjectAsync(); } else { await _jsonWriter.WriteEndArrayAsync(); } }
/// <summary> /// Write end of either object or array to JSON output. /// </summary> /// <param name="segment">Label or Counter object.</param> private void WriteEndBracketToJson(LorC segment) { if (segment.IsLabel) { _jsonWriter.WriteEndObject(); } else { _jsonWriter.WriteEndArray(); } }