mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 20:42:37 +01:00
b7575e05c1
More DailySeries repo work done
33 lines
1.2 KiB
C#
33 lines
1.2 KiB
C#
using System.Linq;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Serialization;
|
|
|
|
namespace NzbDrone.Services.Api.Extensions
|
|
{
|
|
public static class Serializer
|
|
{
|
|
static Serializer()
|
|
{
|
|
Settings = new JsonSerializerSettings
|
|
{
|
|
DateTimeZoneHandling = DateTimeZoneHandling.Utc,
|
|
NullValueHandling = NullValueHandling.Ignore,
|
|
Formatting = Formatting.None,
|
|
DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate
|
|
};
|
|
|
|
Instance = new JsonSerializer
|
|
{
|
|
DateTimeZoneHandling = Settings.DateTimeZoneHandling,
|
|
NullValueHandling = NullValueHandling.Ignore,
|
|
Formatting = Formatting.None,
|
|
DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate,
|
|
ContractResolver = new CamelCasePropertyNamesContractResolver()
|
|
};
|
|
}
|
|
|
|
public static JsonSerializerSettings Settings { get; private set; }
|
|
|
|
public static JsonSerializer Instance { get; private set; }
|
|
}
|
|
} |