public override void WriteJson( JsonWriter writer, object value, JsonSerializer serializer) { writer.WriteStartObject(); FeedRangeInternalConverter.WriteJObject(writer, value, serializer); writer.WriteEndObject(); }
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { if (value is FeedRangeCompositeContinuation feedRangeCompositeContinuation) { writer.WriteStartObject(); writer.WritePropertyName(FeedRangeCompositeContinuationConverter.VersionPropertyName); writer.WriteValue(FeedRangeContinuationVersion.V1); writer.WritePropertyName(FeedRangeCompositeContinuationConverter.RidPropertyName); writer.WriteValue(feedRangeCompositeContinuation.ContainerRid); writer.WritePropertyName(FeedRangeCompositeContinuationConverter.ContinuationPropertyName); serializer.Serialize(writer, feedRangeCompositeContinuation.CompositeContinuationTokens.ToArray()); FeedRangeInternalConverter.WriteJObject(writer, feedRangeCompositeContinuation.FeedRange, serializer); writer.WriteEndObject(); return; } throw new JsonSerializationException(ClientResources.FeedToken_UnrecognizedFeedToken); }