mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-15 01:23:53 -07:00
spelling
This commit is contained in:
parent
c35682376e
commit
cf8be4bf8f
16 changed files with 20 additions and 21 deletions
33
NzbDrone.Api/Extensions/Serializer.cs
Normal file
33
NzbDrone.Api/Extensions/Serializer.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
|
||||
namespace NzbDrone.Api.Extensions
|
||||
{
|
||||
public static class Serializer
|
||||
{
|
||||
static Serializer()
|
||||
{
|
||||
Settings = new JsonSerializerSettings
|
||||
{
|
||||
DateTimeZoneHandling = DateTimeZoneHandling.Utc,
|
||||
NullValueHandling = NullValueHandling.Ignore,
|
||||
Formatting = Formatting.Indented,
|
||||
DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate
|
||||
};
|
||||
|
||||
Instance = new JsonSerializer
|
||||
{
|
||||
DateTimeZoneHandling = Settings.DateTimeZoneHandling,
|
||||
NullValueHandling = NullValueHandling.Ignore,
|
||||
Formatting = Formatting.Indented,
|
||||
DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate,
|
||||
ContractResolver = new CamelCasePropertyNamesContractResolver()
|
||||
};
|
||||
}
|
||||
|
||||
public static JsonSerializerSettings Settings { get; private set; }
|
||||
|
||||
public static JsonSerializer Instance { get; private set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue