JsonConverters
JsonConverters are components that customize how objects are serialized to and deserialized from JSON. They are used by JSON libraries to extend default serialization behavior and to handle types that the built-in rules cannot process reliably. Notable implementations appear in Newtonsoft.Json as JsonConverter and in System.Text.Json as JsonConverter or JsonConverter<T>.
A converter provides logic to write a type’s JSON representation and to read JSON back into an
Common use cases include formatting dates and times in a specific string form, serializing enums as strings
In practice, a converter is created by subclassing the appropriate abstract class and implementing the read
See also: JSON serialization, Newtonsoft.Json, System.Text.Json, JsonSerializer, JsonConverter.