diff --git a/src/NzbDrone.Core/Datastore/Converters/EmbeddedDocumentConverter.cs b/src/NzbDrone.Core/Datastore/Converters/EmbeddedDocumentConverter.cs index 92a634cdd..f24cc9b8b 100644 --- a/src/NzbDrone.Core/Datastore/Converters/EmbeddedDocumentConverter.cs +++ b/src/NzbDrone.Core/Datastore/Converters/EmbeddedDocumentConverter.cs @@ -21,7 +21,7 @@ namespace NzbDrone.Core.Datastore.Converters WriteIndented = true }; - serializerSettings.Converters.Add(new NoFlagsStringEnumConverter()); + serializerSettings.Converters.Add(new JsonStringEnumConverter(JsonNamingPolicy.CamelCase, true)); serializerSettings.Converters.Add(new TimeSpanConverter()); serializerSettings.Converters.Add(new UtcConverter()); diff --git a/src/NzbDrone.Core/Datastore/Converters/NoFlagsStringEnumConverter.cs b/src/NzbDrone.Core/Datastore/Converters/NoFlagsStringEnumConverter.cs deleted file mode 100644 index bd30b659c..000000000 --- a/src/NzbDrone.Core/Datastore/Converters/NoFlagsStringEnumConverter.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace NzbDrone.Core.Datastore.Converters -{ - public class NoFlagsStringEnumConverter : JsonConverterFactory - { - private static JsonStringEnumConverter s_stringEnumConverter = new JsonStringEnumConverter(JsonNamingPolicy.CamelCase, false); - - public override bool CanConvert(Type typeToConvert) - => typeToConvert.IsEnum && !typeToConvert.IsDefined(typeof(FlagsAttribute), inherit: false); - - public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options) - => s_stringEnumConverter.CreateConverter(typeToConvert, options); - } -}