more json cleanup.

This commit is contained in:
Keivan Beigi 2013-09-18 17:30:37 -07:00
parent 88b9104bc9
commit 25b0a4f275
4 changed files with 4 additions and 8 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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; }
} }
} }

View File

@ -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; }