How to tell Json.Net globally to apply the StringEnumConverter to all enums

Add a StringEnumConverter to the JsonSerializerSettings Converters collection.

Documentation: Serialize with JsonConverters


If you want the serializer to use camelCasing, you can set this as well:

SerializerSettings.Converters.Add(
    new StringEnumConverter { CamelCaseText = true });

This will serialize SomeValue to someValue.

Leave a Comment