Updated JsonDefaults
This commit is contained in:
parent
00ff3b9096
commit
0337e39bae
|
@ -227,6 +227,7 @@ namespace Jellyfin.Server.Extensions
|
|||
options.JsonSerializerOptions.WriteIndented = jsonOptions.WriteIndented;
|
||||
options.JsonSerializerOptions.DefaultIgnoreCondition = jsonOptions.DefaultIgnoreCondition;
|
||||
options.JsonSerializerOptions.NumberHandling = jsonOptions.NumberHandling;
|
||||
options.JsonSerializerOptions.PropertyNameCaseInsensitive = jsonOptions.PropertyNameCaseInsensitive;
|
||||
|
||||
options.JsonSerializerOptions.Converters.Clear();
|
||||
foreach (var converter in jsonOptions.Converters)
|
||||
|
|
|
@ -36,7 +36,8 @@ namespace MediaBrowser.Common.Json
|
|||
ReadCommentHandling = JsonCommentHandling.Disallow,
|
||||
WriteIndented = false,
|
||||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
|
||||
NumberHandling = JsonNumberHandling.AllowReadingFromString
|
||||
NumberHandling = JsonNumberHandling.AllowReadingFromString,
|
||||
PropertyNameCaseInsensitive = true
|
||||
};
|
||||
|
||||
options.Converters.Add(new JsonGuidConverter());
|
||||
|
@ -56,7 +57,6 @@ namespace MediaBrowser.Common.Json
|
|||
{
|
||||
var options = GetOptions();
|
||||
options.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
|
||||
options.PropertyNameCaseInsensitive = true;
|
||||
return options;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user