Skip to content

Commit

Permalink
Update JSON Library (QuantConnect#5218)
Browse files Browse the repository at this point in the history
* Update NewtonSoft.Json from 10.0.3 to 12.0.3

* Remove JsonSerializer.Populate(), values are already populated
  • Loading branch information
C-SELLERS authored Jan 28, 2021
1 parent 15cb846 commit 472896c
Show file tree
Hide file tree
Showing 15 changed files with 14 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NetCore.Analyzers" Version="2.9.3" />
<PackageReference Include="Microsoft.NetFramework.Analyzers" Version="2.9.3" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NodaTime" Version="1.3.4" />
<PackageReference Include="QuantConnect.pythonnet" Version="1.0.5.30" />
<PackageReference Include="R.NET.Community" Version="1.6.5" />
Expand Down
2 changes: 1 addition & 1 deletion Algorithm/QuantConnect.Algorithm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NetCore.Analyzers" Version="2.9.3" />
<PackageReference Include="Microsoft.NetFramework.Analyzers" Version="2.9.3" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NodaTime" Version="1.3.4" />
<PackageReference Include="QuantConnect.pythonnet" Version="1.0.5.30" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Api/QuantConnect.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NetCore.Analyzers" Version="2.9.3" />
<PackageReference Include="Microsoft.NetFramework.Analyzers" Version="2.9.3" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NodaTime" Version="1.3.4" />
<PackageReference Include="RestSharp" Version="106.6.10" />
<PackageReference Include="SharpZipLib" Version="1.2.0" />
Expand Down
2 changes: 1 addition & 1 deletion Brokerages/QuantConnect.Brokerages.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<PackageReference Include="Microsoft.NetCore.Analyzers" Version="2.9.3" />
<PackageReference Include="Microsoft.NetFramework.Analyzers" Version="2.9.3" />
<PackageReference Include="NATS.Client" Version="0.8.1" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NodaTime" Version="1.3.4" />
<PackageReference Include="QuantConnect.IBAutomater" Version="1.0.43" />
<PackageReference Include="RestSharp" Version="106.6.10" />
Expand Down
2 changes: 1 addition & 1 deletion Common/QuantConnect.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NetCore.Analyzers" Version="2.9.3" />
<PackageReference Include="Microsoft.NetFramework.Analyzers" Version="2.9.3" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NodaTime" Version="1.3.4" />
<PackageReference Include="protobuf-net" Version="3.0.29" />
<PackageReference Include="protobuf-net.Core" Version="3.0.29" />
Expand Down
7 changes: 0 additions & 7 deletions Common/Util/TypeChangeJsonConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
// Create target object based on token
var target = Create(objectType, token);

var targetType = target.GetType();
if (targetType.IsClass && targetType != typeof(SecurityIdentifier) && targetType != typeof(string) && PopulateProperties)
{
// Populate the object properties
serializer.Populate(token.CreateReader(), target);
}

return target;
}

Expand Down
2 changes: 1 addition & 1 deletion Configuration/QuantConnect.Configuration.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NetCore.Analyzers" Version="2.9.3" />
<PackageReference Include="Microsoft.NetFramework.Analyzers" Version="2.9.3" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Data.DataSetExtensions" />
Expand Down
2 changes: 1 addition & 1 deletion Engine/QuantConnect.Lean.Engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NetCore.Analyzers" Version="2.9.3" />
<PackageReference Include="Microsoft.NetFramework.Analyzers" Version="2.9.3" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NodaTime" Version="1.3.4" />
<PackageReference Include="QuantConnect.pythonnet" Version="1.0.5.30" />
<PackageReference Include="RestSharp" Version="106.6.10" />
Expand Down
2 changes: 1 addition & 1 deletion Messaging/QuantConnect.Messaging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<PackageReference Include="Microsoft.NetCore.Analyzers" Version="2.9.3" />
<PackageReference Include="Microsoft.NetFramework.Analyzers" Version="2.9.3" />
<PackageReference Include="NetMQ" Version="4.0.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="RestSharp" Version="106.6.10" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Data.DataSetExtensions" />
Expand Down
2 changes: 1 addition & 1 deletion Optimizer/QuantConnect.Optimizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Data.DataSetExtensions" />
Expand Down
2 changes: 1 addition & 1 deletion Queues/QuantConnect.Queues.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NetCore.Analyzers" Version="2.9.3" />
<PackageReference Include="Microsoft.NetFramework.Analyzers" Version="2.9.3" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Data.DataSetExtensions" />
Expand Down
2 changes: 1 addition & 1 deletion Report/QuantConnect.Report.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="morelinq" Version="3.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NodaTime" Version="1.3.4" />
<PackageReference Include="QuantConnect.pythonnet" Version="1.0.5.30" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.3" />
Expand Down
2 changes: 1 addition & 1 deletion Tests/QuantConnect.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<PackageReference Include="Mono.Cecil" Version="0.11.3" />
<PackageReference Include="Moq" Version="4.7.63" />
<PackageReference Include="NetMQ" Version="4.0.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NodaTime" Version="1.3.4" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
Expand Down
2 changes: 1 addition & 1 deletion ToolBox/QuantConnect.ToolBox.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
</PackageReference>
<PackageReference Include="Microsoft.NetCore.Analyzers" Version="2.9.3" />
<PackageReference Include="Microsoft.NetFramework.Analyzers" Version="2.9.3" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NodaTime" Version="1.3.4" />
<PackageReference Include="QuantConnect.pythonnet" Version="1.0.5.30" />
<PackageReference Include="SevenZipSharp" Version="0.64" />
Expand Down

0 comments on commit 472896c

Please sign in to comment.