diff --git a/NzbDrone.Common/Serializer/Json.cs b/NzbDrone.Common/Serializer/Json.cs index c6c4ded7e..5c6ca439d 100644 --- a/NzbDrone.Common/Serializer/Json.cs +++ b/NzbDrone.Common/Serializer/Json.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using System.Linq.Expressions; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Serialization; @@ -25,6 +26,7 @@ static Json() SerializerSetting.Converters.Add(new StringEnumConverter { CamelCaseText = true }); SerializerSetting.Converters.Add(new IntConverter()); + SerializerSetting.Converters.Add(new VersionConverter()); Serializer = JsonSerializer.Create(SerializerSetting); diff --git a/NzbDrone.Core.Test/DataAugmentationFixture/Scene/SceneMappingProxyFixture.cs b/NzbDrone.Core.Test/DataAugmentationFixture/Scene/SceneMappingProxyFixture.cs index 587e70697..cef5a5d0b 100644 --- a/NzbDrone.Core.Test/DataAugmentationFixture/Scene/SceneMappingProxyFixture.cs +++ b/NzbDrone.Core.Test/DataAugmentationFixture/Scene/SceneMappingProxyFixture.cs @@ -1,7 +1,7 @@ using System.Net; using FluentAssertions; -using NUnit.Framework; using Newtonsoft.Json; +using NUnit.Framework; using NzbDrone.Common; using NzbDrone.Core.DataAugmentation.Scene; using NzbDrone.Core.Test.Framework; diff --git a/NzbDrone.Core/Download/Clients/Nzbget/JsonRequest.cs b/NzbDrone.Core/Download/Clients/Nzbget/JsonRequest.cs index 29a22f763..a2e4b88c4 100644 --- a/NzbDrone.Core/Download/Clients/Nzbget/JsonRequest.cs +++ b/NzbDrone.Core/Download/Clients/Nzbget/JsonRequest.cs @@ -1,14 +1,10 @@ using System; -using Newtonsoft.Json; namespace NzbDrone.Core.Download.Clients.Nzbget { public class JsonRequest { - [JsonProperty(PropertyName = "method")] public String Method { get; set; } - - [JsonProperty(PropertyName = "params")] public object[] Params { get; set; } } } diff --git a/NzbDrone.Core/Update/UpdatePackage.cs b/NzbDrone.Core/Update/UpdatePackage.cs index 70ca40b87..f94a77e4b 100644 --- a/NzbDrone.Core/Update/UpdatePackage.cs +++ b/NzbDrone.Core/Update/UpdatePackage.cs @@ -1,6 +1,5 @@ using System; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; + namespace NzbDrone.Core.Update { @@ -8,7 +7,6 @@ public class UpdatePackage { public string Id { get; set; } - [JsonConverter(typeof(VersionConverter))] public Version Version { get; set; } public String Branch { get; set; }