Enum JSON Converter

Enum JSON converter. In addition to the SingleOrArrayEnumConverter mentioned previously I’ve also created a version to translate enums to/from JSON using the name of the enum rather than it’s value as is the default. class EnumConverter<T> : JsonConverter { public override bool CanConvert(Type objectType) { return (objectType == typeof(T)); } Read more…

Single or Array Enum JSON Converter

Single or array enum JSON converter. In addition to the SingleOrArrayConverter mentioned previously I’ve also created a version to translate enums to/from JSON using the name of the enum rather than it’s value as is the default. public class SingleOrArrayEnumConverter<T> : JsonConverter { public override bool CanConvert(Type objectType) { return Read more…