public override void WriteJson(JsonWriter writer, object?value, JsonSerializer serializer) { if (value == null) { return; } writer.WriteStartObject(); var at = OutgoingMessageHelper.GetAt(value); if (at != null) { writer.WritePropertyName("At"); serializer.Serialize(writer, at); } var within = OutgoingMessageHelper.GetWithin(value); if (within != null) { writer.WritePropertyName("Within"); serializer.Serialize(writer, within); } OutgoingMessageConverter.WriteBaseMembers(writer, value, serializer); writer.WriteEndObject(); }
public override void Write(VerifyJsonWriter writer, object value) { writer.WriteStartObject(); var at = OutgoingMessageHelper.GetAt(value); writer.WriteProperty(value, at, "At"); var within = OutgoingMessageHelper.GetWithin(value); writer.WriteProperty(value, within, "Within"); OutgoingMessageConverter.WriteBaseMembers(writer, value); writer.WriteEndObject(); }