diff --git a/Jellyfin.Server/Models/JsonOptions.cs b/Jellyfin.Server/Models/JsonOptions.cs
index fa503bc9a..2f0df3d2c 100644
--- a/Jellyfin.Server/Models/JsonOptions.cs
+++ b/Jellyfin.Server/Models/JsonOptions.cs
@@ -7,11 +7,6 @@ namespace Jellyfin.Server.Models
///
public static class JsonOptions
{
- ///
- /// Base Json Serializer Options.
- ///
- private static readonly JsonSerializerOptions _jsonOptions = new JsonSerializerOptions();
-
///
/// Gets CamelCase json options.
///
@@ -19,7 +14,7 @@ namespace Jellyfin.Server.Models
{
get
{
- var options = _jsonOptions;
+ var options = DefaultJsonOptions;
options.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
return options;
}
@@ -32,10 +27,15 @@ namespace Jellyfin.Server.Models
{
get
{
- var options = _jsonOptions;
+ var options = DefaultJsonOptions;
options.PropertyNamingPolicy = null;
return options;
}
}
+
+ ///
+ /// Gets base Json Serializer Options.
+ ///
+ private static JsonSerializerOptions DefaultJsonOptions => new JsonSerializerOptions();
}
}