/// <summary> /// Writes the value into a specified writer in the form of a debug string. /// </summary> /// <param name="writer">The writer to write to.</param> protected override void WriteToDebugString(System.IO.TextWriter writer) { writer.Write('"'); writer.Write(this.Name); writer.Write("\": "); JsonValue.WriteValueToDebugString(this.Value, writer); }
/// <summary> /// Writes the value into a specified writer in the form of a debug string. /// </summary> /// <param name="writer">The writer to write to.</param> protected override void WriteToDebugString(System.IO.TextWriter writer) { writer.WriteLine("["); bool isFirst = true; foreach (JsonValue element in this.Elements) { if (!isFirst) { writer.Write(", "); } isFirst = false; JsonValue.WriteValueToDebugString(element, writer); } writer.WriteLine(); writer.Write("]"); }
/// <summary> /// Writes the value into a specified writer in the form of a debug string. /// </summary> /// <param name="writer">The writer to write to.</param> protected override void WriteToDebugString(System.IO.TextWriter writer) { writer.WriteLine("{"); bool isFirst = true; foreach (JsonProperty property in this.Properties) { if (!isFirst) { writer.Write(", "); } isFirst = false; JsonValue.WriteValueToDebugString(property, writer); } writer.WriteLine(); writer.Write("}"); }