Skip to content

Commit d2c6660

Browse files
authored
Bump Newtonsoft.Json to 13.0.1 (#369)
* Bump Newtonsoft.Json to 13.0.1 - also bump Newtonsoft.Json.Bson to 1.0.2 in System.Net.Http.Formatting.NetStandard - incorporates changes from 23 Dependabot PRs; they are now obsolete - Dependabot also left `@(Reference)` items alone in project files 😦 - fixed what Dependabot didn't do i.e. corrected paths and assembly identities in those items <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/JamesNK/Newtonsoft.Json/releases">Newtonsoft.Json's releases</a>.</em></p> <blockquote> <h2>13.0.1</h2> <ul> <li>New feature - Add JsonSelectSettings with configuration for a regex timeout</li> <li>Change - Remove portable assemblies from NuGet package</li> <li>Change - JsonReader and JsonSerializer MaxDepth defaults to 64</li> <li>Fix - Fixed throwing missing member error on ignored fields</li> <li>Fix - Fixed various nullable annotations</li> <li>Fix - Fixed annotations not being copied when tokens are cloned</li> <li>Fix - Fixed naming strategy not being used when deserializing dictionary enum keys</li> <li>Fix - Fixed serializing nullable struct dictionaries</li> <li>Fix - Fixed JsonWriter.WriteToken to allow null with string token</li> <li>Fix - Fixed missing error when deserializing JToken with a contract type mismatch</li> <li>Fix - Fixed JTokenWriter when writing comment to an object</li> </ul> <h2>12.0.3</h2> <ul> <li>New feature - Added support for nullable reference types</li> <li>New feature - Added KebabCaseNamingStrategy</li> <li>Change - Package now uses embedded package icon</li> <li>Fix - Fixed bug when merging JToken with itself</li> <li>Fix - Fixed performance of calling ICustomTypeDescriptor.GetProperties</li> <li>Fix - Fixed serializing Enumerable.Empty and empty arrays on .NET Core 3.0</li> <li>Fix - Fixed deserializing some collection types with constructor</li> <li>Fix - Fixed deserializing IImmutableSet to ImmutableHashSet instead of ImmutableSortedSet</li> <li>Fix - Fixed deserializing IImmutableDictionary to ImmutableDictionary instead of ImmutableSortedDictionary</li> <li>Fix - Fixed deserializing into constructors with more than 256 parameters</li> <li>Fix - Fixed hang when deserializing JTokenReader with preceding comment</li> <li>Fix - Fixed JSONPath scanning with nested indexer</li> <li>Fix - Fixed deserializing incomplete JSON object to JObject</li> <li>Fix - Fixed using StringEnumConverter with naming strategy and specified values</li> </ul> <h2>12.0.2</h2> <ul> <li>New feature - Added MissingMemberHandling to JsonObjectAttribute and JsonObjectContract</li> <li>New feature - Added constructor to JTokenReader to specify initial path</li> <li>New feature - Added JsonProperty.IsRequiredSpecified</li> <li>New feature - Added JsonContract.InternalConverter</li> <li>Change - Moved embedded debug symbols in NuGet package to a symbol package on NuGet.org</li> <li>Fix - Fixed deserializing nullable struct collections</li> <li>Fix - Fixed memory link when serializing enums to named values</li> <li>Fix - Fixed error when setting JsonLoadSettings.DuplicatePropertyNameHandling to Replace</li> </ul> <h2>12.0.1</h2> <ul> <li>New feature - Added NuGet package signing</li> <li>New feature - Added Authenticode assembly signing</li> <li>New feature - Added SourceLink support</li> <li>New feature - Added constructors to StringEnumConverter for setting AllowIntegerValue</li> <li>New feature - Added JsonNameTable and JsonTextReader.PropertyNameTable</li> <li>New feature - Added line information to JsonSerializationException</li> <li>New feature - Added JObject.Property overload with a StringComparison</li> <li>New feature - Added JsonMergeSettings.PropertyNameComparison</li> <li>New feature - Added support for multiple Date constructors with JavaScriptDateTimeConverter</li> <li>New feature - Added support for strict equals and strict not equals in JSON Path queries</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/JamesNK/Newtonsoft.Json/commit/ae9fe44e1323e91bcbd185ca1a14099fba7c021f"><code>ae9fe44</code></a> Remove compiler package and update sourcelink (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2498">#2498</a>)</li> <li><a href="https://github.com/JamesNK/Newtonsoft.Json/commit/8ef662189dd7fc890c8fcd832d3e283edb90ef31"><code>8ef6621</code></a> Remove prerelease for 13.0.1</li> <li><a href="https://github.com/JamesNK/Newtonsoft.Json/commit/11331f50fd1c09dc1f44fe17ef26aba7c460b42c"><code>11331f5</code></a> Update SDK to 5.0.200 (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2495">#2495</a>)</li> <li><a href="https://github.com/JamesNK/Newtonsoft.Json/commit/c7e8abc09de751785355e3f972150f8a72379b02"><code>c7e8abc</code></a> Update to 13.0.1-beta2</li> <li><a href="https://github.com/JamesNK/Newtonsoft.Json/commit/1745d7c14ec7e4244a5ca1c7ddf5d955cf7d1f43"><code>1745d7c</code></a> Fix JTokenWriter when writing comment to an object (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2493">#2493</a>)</li> <li><a href="https://github.com/JamesNK/Newtonsoft.Json/commit/583eb120152f8b6332df2fe3d4b9f4c947c944d0"><code>583eb12</code></a> Fix missing error when deserializing JToken with a contract type mismatch (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2">#2</a>...</li> <li><a href="https://github.com/JamesNK/Newtonsoft.Json/commit/b6dc05be5a0f4808f06ec430f3bb59b24d3fbc3e"><code>b6dc05b</code></a> Change MaxDepth default to 64 (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2473">#2473</a>)</li> <li><a href="https://github.com/JamesNK/Newtonsoft.Json/commit/15525f1c44e0d99ef8fdee73430853e22239181d"><code>15525f1</code></a> Fix JsonWriter.WriteToken to allow null with string token (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2472">#2472</a>)</li> <li><a href="https://github.com/JamesNK/Newtonsoft.Json/commit/926d2f0f42292cfcdf07cdadeb501b73fd5b1d52"><code>926d2f0</code></a> Enable embed untracked sources (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2471">#2471</a>)</li> <li><a href="https://github.com/JamesNK/Newtonsoft.Json/commit/0a56633b6cd4fccc860a8486260ee67636f3fe90"><code>0a56633</code></a> Fixes <a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2372">#2372</a> - variable typos (<a href="https://github-redirect.dependabot.com/JamesNK/Newtonsoft.Json/issues/2465">#2465</a>)</li> <li>Additional commits viewable in <a href="https://github.com/JamesNK/Newtonsoft.Json/compare/6.0.4...13.0.1">compare view</a></li> </ul> </details> * React to Newtonsoft.Json changes - react to `BsonReader`, `BsonWriter` deprecation - one of our `DateTime` tests now consistently hits `5` errors - `s/True/true/` also consistent now in another test - `decimal` overflow now `throw`s a `JsonReaderException` * Remove Newtonsoft.Json binding redirects - where possible, entirely remove app.config files - w/ consistent Newtonsoft.Json versions, these special cases are mostly not needed - auto-generation of .config file handles the special case just fine in System.Net.Http.Formatting.NetStandard.Test.csproj and System.Web.Http.SignalR.Test.csproj
1 parent 06589fb commit d2c6660

File tree

66 files changed

+90
-259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+90
-259
lines changed

src/Microsoft.AspNet.Facebook/Microsoft.AspNet.Facebook.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
<SpecificVersion>False</SpecificVersion>
2727
<HintPath>..\..\packages\Facebook.6.4.2\lib\net45\Facebook.dll</HintPath>
2828
</Reference>
29-
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
30-
<HintPath>..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
29+
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
30+
<HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
3131
<SpecificVersion>False</SpecificVersion>
3232
<Private>False</Private>
3333
</Reference>

src/Microsoft.AspNet.Facebook/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
<packages>
33
<package id="Facebook" version="6.4.2" targetFramework="net45" />
44
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
5-
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
5+
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net45" />
66
</packages>

src/System.Net.Http.Formatting.NetCore/System.Net.Http.Formatting.NetCore.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@
254254
</ItemGroup>
255255
<ItemGroup>
256256
<Reference Include="Newtonsoft.Json">
257-
<HintPath>..\..\packages\Newtonsoft.Json.6.0.4\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath>
257+
<HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\netstandard1.0\Newtonsoft.Json.dll</HintPath>
258258
</Reference>
259259
<Reference Include="System.Net.Http">
260260
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.13\lib\portable-net40+sl4+win8+wp71\System.Net.Http.dll</HintPath>
@@ -266,7 +266,7 @@
266266
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.13\lib\portable-net40+sl4+win8+wp71\System.Net.Http.Primitives.dll</HintPath>
267267
</Reference>
268268
</ItemGroup>
269-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
269+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
270270
Other similar extension points exist, see Microsoft.Common.targets.
271271
<Target Name="BeforeBuild">
272272
</Target>

src/System.Net.Http.Formatting.NetCore/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
<package id="Microsoft.Bcl" version="1.1.3" targetFramework="portable-win+net45+wp80" requireReinstallation="True" />
44
<package id="Microsoft.Bcl.Build" version="1.0.8" targetFramework="portable-win+net45+wp80" requireReinstallation="True" />
55
<package id="Microsoft.Net.Http" version="2.2.13" targetFramework="portable-win+net45+wp80" requireReinstallation="True" />
6-
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="portable-net45+win+wpa81+wp80" />
6+
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="portable-net45+win+wpa81+wp80" />
77
</packages>

src/System.Net.Http.Formatting.NetStandard/System.Net.Http.Formatting.NetStandard.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
1515
</PropertyGroup>
1616
<ItemGroup>
17-
<PackageReference Include="Newtonsoft.Json" Version="10.0.1" />
18-
<PackageReference Include="Newtonsoft.Json.Bson" Version="1.0.1" />
17+
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
18+
<PackageReference Include="Newtonsoft.Json.Bson" Version="1.0.2" />
1919
</ItemGroup>
2020
<ItemGroup>
2121
<Compile Include="..\CommonAssemblyInfo.cs">

src/System.Net.Http.Formatting/Formatting/BsonMediaTypeFormatter.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,13 @@ public override JsonReader CreateJsonReader(Type type, Stream readStream, Encodi
200200
throw Error.ArgumentNull("effectiveEncoding");
201201
}
202202

203+
#if !NEWTONSOFTJSON10
204+
#pragma warning disable CS0618 // Type or member is obsolete
205+
#endif
203206
BsonReader reader = new BsonReader(new BinaryReader(readStream, effectiveEncoding));
207+
#if !NEWTONSOFTJSON10
208+
#pragma warning restore CS0618 // Type or member is obsolete
209+
#endif
204210

205211
try
206212
{
@@ -297,7 +303,13 @@ public override JsonWriter CreateJsonWriter(Type type, Stream writeStream, Encod
297303
throw Error.ArgumentNull("effectiveEncoding");
298304
}
299305

306+
#if !NEWTONSOFTJSON10
307+
#pragma warning disable CS0618 // Type or member is obsolete
308+
#endif
300309
return new BsonWriter(new BinaryWriter(writeStream, effectiveEncoding));
310+
#if !NEWTONSOFTJSON10
311+
#pragma warning restore CS0618 // Type or member is obsolete
312+
#endif
301313
}
302314

303315
// Return true if Json.Net will likely convert value of given type to a Json primitive, not JsonArray nor

src/System.Net.Http.Formatting/System.Net.Http.Formatting.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<NoWarn>1591</NoWarn>
1616
</PropertyGroup>
1717
<ItemGroup>
18-
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
19-
<HintPath>..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
18+
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
19+
<HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
2020
<SpecificVersion>False</SpecificVersion>
2121
<Private>False</Private>
2222
</Reference>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
3+
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net45" />
44
</packages>

src/System.Web.Http.SignalR/System.Web.Http.SignalR.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
<Reference Include="Microsoft.AspNet.SignalR.Core">
1717
<HintPath>..\..\packages\Microsoft.AspNet.SignalR.Core.1.0.0\lib\net40\Microsoft.AspNet.SignalR.Core.dll</HintPath>
1818
</Reference>
19-
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
20-
<HintPath>..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
19+
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
20+
<HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
2121
<SpecificVersion>False</SpecificVersion>
2222
<Private>False</Private>
2323
</Reference>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="Microsoft.AspNet.SignalR.Core" version="1.0.0" targetFramework="net45" />
4-
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
4+
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net45" />
55
</packages>

0 commit comments

Comments
 (0)