Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Commit

Permalink
Upgraded Json.Net version to 10.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kichalla committed Mar 28, 2017
1 parent d21af1f commit 9c5b33d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<AspNetCoreVersion>1.2.0-*</AspNetCoreVersion>
<CoreFxVersion>4.3.0</CoreFxVersion>
<DependencyModelVersion>1.1.0</DependencyModelVersion>
<JsonNetVersion>9.0.1</JsonNetVersion>
<JsonNetBsonVersion>1.0.1</JsonNetBsonVersion>
<MoqVersion>4.6.36-alpha</MoqVersion>
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
<RazorCodeAnalysisVersion>1.0.0-*</RazorCodeAnalysisVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public IDictionary<string, object> Deserialize(byte[] value)
Dictionary<string, object> tempDataDictionary = null;

using (var memoryStream = new MemoryStream(value))
using (var writer = new BsonReader(memoryStream))
using (var reader = new BsonDataReader(memoryStream))
{
tempDataDictionary = _jsonSerializer.Deserialize<Dictionary<string, object>>(writer);
tempDataDictionary = _jsonSerializer.Deserialize<Dictionary<string, object>>(reader);
if (tempDataDictionary == null)
{
return new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
Expand Down Expand Up @@ -145,7 +145,7 @@ public byte[] Serialize(IDictionary<string, object> values)

using (var memoryStream = new MemoryStream())
{
using (var writer = new BsonWriter(memoryStream))
using (var writer = new BsonDataWriter(memoryStream))
{
_jsonSerializer.Serialize(writer, values);
return memoryStream.ToArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Microsoft.AspNetCore.Mvc.ViewComponent</Description>
<PackageReference Include="Microsoft.Extensions.PropertyActivator.Sources" Version="$(AspNetCoreVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.Extensions.PropertyHelper.Sources" Version="$(AspNetCoreVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.Extensions.WebEncoders" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Newtonsoft.Json" Version="$(JsonNetVersion)" />
<PackageReference Include="Newtonsoft.Json.Bson" Version="$(JsonNetBsonVersion)" />
<PackageReference Include="System.Buffers" Version="$(CoreFxVersion)" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="$(CoreFxVersion)" />
</ItemGroup>
Expand Down

0 comments on commit 9c5b33d

Please sign in to comment.