Apply suggestions, fix warning
This commit is contained in:
parent
fe632146dc
commit
0765ef8bda
|
@ -7,11 +7,6 @@ namespace Jellyfin.Server.Models
|
|||
/// </summary>
|
||||
public static class JsonOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Base Json Serializer Options.
|
||||
/// </summary>
|
||||
private static readonly JsonSerializerOptions _jsonOptions = new JsonSerializerOptions();
|
||||
|
||||
/// <summary>
|
||||
/// Gets CamelCase json options.
|
||||
/// </summary>
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets base Json Serializer Options.
|
||||
/// </summary>
|
||||
private static JsonSerializerOptions DefaultJsonOptions => new JsonSerializerOptions();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user