1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-19 16:01:46 +02:00
Radarr/NzbDrone.Api/Extentions/Serializer.cs
kay.one 7093f352fe splited MVC and nancy application
backbone app is now fully served from nancy including css,js,html
2013-02-17 18:13:21 -08:00

34 lines
1.2 KiB
C#

using System.IO;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace NzbDrone.Api.Extentions
{
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; }
}
}