diff --git a/NzbDrone.Api/Extensions/NancyJsonSerializer.cs b/NzbDrone.Api/Extensions/NancyJsonSerializer.cs index f0a7818fe..74acedac5 100644 --- a/NzbDrone.Api/Extensions/NancyJsonSerializer.cs +++ b/NzbDrone.Api/Extensions/NancyJsonSerializer.cs @@ -2,6 +2,7 @@ using System.IO; using Nancy; using NzbDrone.Common; +using NzbDrone.Common.Serializer; namespace NzbDrone.Api.Extensions { diff --git a/NzbDrone.Api/Extensions/RequestExtensions.cs b/NzbDrone.Api/Extensions/RequestExtensions.cs index 4b17a247d..7c25911ac 100644 --- a/NzbDrone.Api/Extensions/RequestExtensions.cs +++ b/NzbDrone.Api/Extensions/RequestExtensions.cs @@ -3,6 +3,7 @@ using Nancy; using Nancy.Responses; using NzbDrone.Common; +using NzbDrone.Common.Serializer; namespace NzbDrone.Api.Extensions { diff --git a/NzbDrone.Api/SignalR/Serializer.cs b/NzbDrone.Api/SignalR/Serializer.cs index dc45e6f3f..efc5d2590 100644 --- a/NzbDrone.Api/SignalR/Serializer.cs +++ b/NzbDrone.Api/SignalR/Serializer.cs @@ -8,10 +8,10 @@ namespace NzbDrone.Api.SignalR [Singleton] public class Serializer : IJsonSerializer { - private readonly Common.IJsonSerializer _nzbDroneSerializer; + private readonly Common.Serializer.IJsonSerializer _nzbDroneSerializer; private readonly JsonNetSerializer _signalRSerializer; - public Serializer(Common.IJsonSerializer nzbDroneSerializer) + public Serializer(Common.Serializer.IJsonSerializer nzbDroneSerializer) { _signalRSerializer = new JsonNetSerializer(); _nzbDroneSerializer = nzbDroneSerializer; diff --git a/NzbDrone.Common/IJsonSerializer.cs b/NzbDrone.Common/IJsonSerializer.cs index 05f64b73a..90c39d12a 100644 --- a/NzbDrone.Common/IJsonSerializer.cs +++ b/NzbDrone.Common/IJsonSerializer.cs @@ -4,7 +4,7 @@ using Newtonsoft.Json.Converters; using Newtonsoft.Json.Serialization; -namespace NzbDrone.Common +namespace NzbDrone.Common.Serializer { public interface IJsonSerializer { @@ -24,7 +24,7 @@ public JsonSerializer() _jsonNetSerializer = new Newtonsoft.Json.JsonSerializer() { DateTimeZoneHandling = DateTimeZoneHandling.Utc, - NullValueHandling = NullValueHandling.Include, + NullValueHandling = NullValueHandling.Ignore, Formatting = Formatting.Indented, DefaultValueHandling = DefaultValueHandling.Include, ContractResolver = new CamelCasePropertyNamesContractResolver() diff --git a/NzbDrone.Common/NzbDrone.Common.csproj b/NzbDrone.Common/NzbDrone.Common.csproj index 2d6119d33..5f399945f 100644 --- a/NzbDrone.Common/NzbDrone.Common.csproj +++ b/NzbDrone.Common/NzbDrone.Common.csproj @@ -120,7 +120,7 @@ - + diff --git a/NzbDrone.Core.Test/Datastore/MappingExtentionFixture.cs b/NzbDrone.Core.Test/Datastore/MappingExtentionFixture.cs index 67f6e57d5..b6613b071 100644 --- a/NzbDrone.Core.Test/Datastore/MappingExtentionFixture.cs +++ b/NzbDrone.Core.Test/Datastore/MappingExtentionFixture.cs @@ -4,6 +4,7 @@ using Marr.Data; using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Serializer; using NzbDrone.Core.Datastore; using NzbDrone.Core.Datastore.Converters; using NzbDrone.Core.Tv; diff --git a/NzbDrone.Core/DataAugmentation/DailySeries/DailySeriesDataProxy.cs b/NzbDrone.Core/DataAugmentation/DailySeries/DailySeriesDataProxy.cs index 12ddfc693..ffe70ee4c 100644 --- a/NzbDrone.Core/DataAugmentation/DailySeries/DailySeriesDataProxy.cs +++ b/NzbDrone.Core/DataAugmentation/DailySeries/DailySeriesDataProxy.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using NLog; using NzbDrone.Common; +using NzbDrone.Common.Serializer; using NzbDrone.Core.Configuration; namespace NzbDrone.Core.DataAugmentation.DailySeries diff --git a/NzbDrone.Core/DataAugmentation/Scene/SceneMappingProxy.cs b/NzbDrone.Core/DataAugmentation/Scene/SceneMappingProxy.cs index 28d6f4d48..fc5d715bb 100644 --- a/NzbDrone.Core/DataAugmentation/Scene/SceneMappingProxy.cs +++ b/NzbDrone.Core/DataAugmentation/Scene/SceneMappingProxy.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using NzbDrone.Common; +using NzbDrone.Common.Serializer; using NzbDrone.Core.Configuration; namespace NzbDrone.Core.DataAugmentation.Scene diff --git a/NzbDrone.Core/Datastore/Converters/EmbeddedDocumentConverter.cs b/NzbDrone.Core/Datastore/Converters/EmbeddedDocumentConverter.cs index 845796b81..5a49079f1 100644 --- a/NzbDrone.Core/Datastore/Converters/EmbeddedDocumentConverter.cs +++ b/NzbDrone.Core/Datastore/Converters/EmbeddedDocumentConverter.cs @@ -2,6 +2,7 @@ using Marr.Data.Converters; using Marr.Data.Mapping; using NzbDrone.Common; +using NzbDrone.Common.Serializer; namespace NzbDrone.Core.Datastore.Converters { diff --git a/NzbDrone.Core/Datastore/TableMapping.cs b/NzbDrone.Core/Datastore/TableMapping.cs index 2698ef354..fd05a11e6 100644 --- a/NzbDrone.Core/Datastore/TableMapping.cs +++ b/NzbDrone.Core/Datastore/TableMapping.cs @@ -4,6 +4,7 @@ using Marr.Data; using Marr.Data.Mapping; using NzbDrone.Common; +using NzbDrone.Common.Serializer; using NzbDrone.Core.Configuration; using NzbDrone.Core.DataAugmentation.Scene; using NzbDrone.Core.Datastore.Converters; diff --git a/NzbDrone.Core/Indexers/IndexerWithSetting.cs b/NzbDrone.Core/Indexers/IndexerWithSetting.cs index 7efa6367f..21a0aed9f 100644 --- a/NzbDrone.Core/Indexers/IndexerWithSetting.cs +++ b/NzbDrone.Core/Indexers/IndexerWithSetting.cs @@ -1,4 +1,5 @@ using NzbDrone.Common; +using NzbDrone.Common.Serializer; namespace NzbDrone.Core.Indexers { diff --git a/NzbDrone.Core/Indexers/Newznab/Newznab.cs b/NzbDrone.Core/Indexers/Newznab/Newznab.cs index 1df895dd8..d70a26268 100644 --- a/NzbDrone.Core/Indexers/Newznab/Newznab.cs +++ b/NzbDrone.Core/Indexers/Newznab/Newznab.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using NzbDrone.Common; +using NzbDrone.Common.Serializer; namespace NzbDrone.Core.Indexers.Newznab { diff --git a/NzbDrone.Integration.Test/Client/ClientBase.cs b/NzbDrone.Integration.Test/Client/ClientBase.cs index 06193542c..906178bd7 100644 --- a/NzbDrone.Integration.Test/Client/ClientBase.cs +++ b/NzbDrone.Integration.Test/Client/ClientBase.cs @@ -4,6 +4,7 @@ using NLog; using NzbDrone.Api.REST; using NzbDrone.Common; +using NzbDrone.Common.Serializer; using RestSharp; namespace NzbDrone.Integration.Test.Client diff --git a/NzbDrone.Libraries.Test/Json/JsonFixture.cs b/NzbDrone.Libraries.Test/Json/JsonFixture.cs index 05df5fd1e..666297861 100644 --- a/NzbDrone.Libraries.Test/Json/JsonFixture.cs +++ b/NzbDrone.Libraries.Test/Json/JsonFixture.cs @@ -1,5 +1,6 @@ using NUnit.Framework; using NzbDrone.Common; +using NzbDrone.Common.Serializer; using NzbDrone.Test.Common; namespace NzbDrone.Libraries.Test.Json diff --git a/NzbDrone.Test.Common/TestBase.cs b/NzbDrone.Test.Common/TestBase.cs index d423b4b3c..33f053ddb 100644 --- a/NzbDrone.Test.Common/TestBase.cs +++ b/NzbDrone.Test.Common/TestBase.cs @@ -6,6 +6,7 @@ using NUnit.Framework; using NzbDrone.Common; using NzbDrone.Common.Messaging; +using NzbDrone.Common.Serializer; using NzbDrone.Test.Common.AutoMoq; namespace NzbDrone.Test.Common diff --git a/UI/AddSeries/New/AddNewSeriesView.js b/UI/AddSeries/New/AddNewSeriesView.js index 3f263c84e..0b5911552 100644 --- a/UI/AddSeries/New/AddNewSeriesView.js +++ b/UI/AddSeries/New/AddNewSeriesView.js @@ -18,7 +18,7 @@ define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'AddSeries/New/Sear this.collection.parse = function (response) { _.each(response, function (model) { - model.id = null; + model.id = undefined; }); return response;