public virtual void Format(JsonWriter writer) { writer.WriteStartObject(); foreach (string name in _nameIndexList) { writer.WriteMember(name); writer.WriteValue(InnerHashtable[name]); } writer.WriteEndObject(); }
protected virtual void FormatDictionary(IDictionary dictionary, JsonWriter writer) { writer.WriteStartObject(); foreach (DictionaryEntry entry in dictionary) { writer.WriteMember(entry.Key.ToString()); writer.WriteValue(entry.Value); } writer.WriteEndObject(); }
public void Export(JsonWriter writer) { if (writer == null) throw new ArgumentNullException("writer"); writer.WriteStartObject(); foreach (string name in NameIndexList) { writer.WriteMember(name); writer.WriteValue(InnerHashtable[name]); } writer.WriteEndObject(); }
public virtual void WriteArray(IEnumerable values, JsonWriter valueWriter) { if (values == null) { WriteNull(); } else { WriteStartArray(); foreach (object value in values) valueWriter.WriteValue(value); WriteEndArray(); } }