public void SerializeObject(JsonWriter writer, object instance, IJsonSerializeOperationInfo info) { var jsonArray = (JsonArray)instance; writer.WriteOpenArray(); var first = true; foreach (var item in jsonArray) { if (first) { first = false; } else { writer.WriteItemSeparator(); } _dynamicJsonSerializer.SerializeObject(writer, item, info); } writer.WriteCloseArray(); }
private void Write(JsonWriter writer, object instance, IJsonSerializeOperationInfo info) { writer.WriteOpenArray(); var enumerable = (IEnumerable)instance; var first = true; foreach (var item in enumerable) { if (first) { first = false; } else { writer.WriteItemSeparator(); } _itemSerializer.SerializeObject(writer, item, info); } writer.WriteCloseArray(); }
private void Write(JsonWriter writer, object instance, IJsonSerializeOperationInfo info) { writer.WriteOpenArray(); var enumerable = (IEnumerable)instance; var first = true; foreach (var item in enumerable) { if (first) { first = false; } else { writer.WriteItemSeparator(); } _itemSerializer.SerializeObject(writer, item, info); } writer.WriteCloseArray(); }
public void SerializeObject(JsonWriter writer, object instance, IJsonSerializeOperationInfo info) { var jsonArray = (JsonArray)instance; writer.WriteOpenArray(); var first = true; foreach (var item in jsonArray) { if (first) { first = false; } else { writer.WriteItemSeparator(); } _dynamicJsonSerializer.SerializeObject(writer, item, info); } writer.WriteCloseArray(); }