Original implementation is based on Newtonsoft.Json VersionConverter Writes the JSON representation of the object. The to write to. The value. The calling serializer.
(JsonWriter writer, object value, JsonSerializer serializer)
| 21 | /// <param name="value">The value.</param> |
| 22 | /// <param name="serializer">The calling serializer.</param> |
| 23 | public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) |
| 24 | { |
| 25 | if (value == null) |
| 26 | writer.WriteNull(); |
| 27 | else if (value is Version) |
| 28 | writer.WriteValue(value.ToString()); |
| 29 | else |
| 30 | throw new JsonSerializationException("Expected Version object value"); |
| 31 | } |
| 32 | |
| 33 | /// <summary> |
| 34 | /// Reads the JSON representation of the object. |
nothing calls this directly
no test coverage detected