more json cleanup.

pull/2/head
Keivan Beigi 11 years ago
parent 88b9104bc9
commit 25b0a4f275

@ -1,5 +1,6 @@
using System; using System;
using System.IO; using System.IO;
using System.Linq.Expressions;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization; using Newtonsoft.Json.Serialization;
@ -25,6 +26,7 @@ namespace NzbDrone.Common.Serializer
SerializerSetting.Converters.Add(new StringEnumConverter { CamelCaseText = true }); SerializerSetting.Converters.Add(new StringEnumConverter { CamelCaseText = true });
SerializerSetting.Converters.Add(new IntConverter()); SerializerSetting.Converters.Add(new IntConverter());
SerializerSetting.Converters.Add(new VersionConverter());
Serializer = JsonSerializer.Create(SerializerSetting); Serializer = JsonSerializer.Create(SerializerSetting);

@ -1,7 +1,7 @@
using System.Net; using System.Net;
using FluentAssertions; using FluentAssertions;
using NUnit.Framework;
using Newtonsoft.Json; using Newtonsoft.Json;
using NUnit.Framework;
using NzbDrone.Common; using NzbDrone.Common;
using NzbDrone.Core.DataAugmentation.Scene; using NzbDrone.Core.DataAugmentation.Scene;
using NzbDrone.Core.Test.Framework; using NzbDrone.Core.Test.Framework;

@ -1,14 +1,10 @@
using System; using System;
using Newtonsoft.Json;
namespace NzbDrone.Core.Download.Clients.Nzbget namespace NzbDrone.Core.Download.Clients.Nzbget
{ {
public class JsonRequest public class JsonRequest
{ {
[JsonProperty(PropertyName = "method")]
public String Method { get; set; } public String Method { get; set; }
[JsonProperty(PropertyName = "params")]
public object[] Params { get; set; } public object[] Params { get; set; }
} }
} }

@ -1,6 +1,5 @@
using System; using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace NzbDrone.Core.Update namespace NzbDrone.Core.Update
{ {
@ -8,7 +7,6 @@ namespace NzbDrone.Core.Update
{ {
public string Id { get; set; } public string Id { get; set; }
[JsonConverter(typeof(VersionConverter))]
public Version Version { get; set; } public Version Version { get; set; }
public String Branch { get; set; } public String Branch { get; set; }

Loading…
Cancel
Save