Skip to content

Commit

Permalink
-Build
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK committed Jun 21, 2015
1 parent f77d0db commit 67c2090
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void SerializePerformance()
Stopwatch ts = new Stopwatch();
ts.Start();

for (int i = 0; i < 10000; i++)
for (int i = 0; i < 100; i++)
{
JsonConvert.SerializeObject(values);
}
Expand All @@ -127,7 +127,7 @@ public void DeserializePerformance()
Stopwatch ts = new Stopwatch();
ts.Start();

for (int i = 0; i < 10000; i++)
for (int i = 0; i < 100; i++)
{
JsonConvert.DeserializeObject<List<Shape>>(json);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
Expand Down Expand Up @@ -128,10 +129,10 @@ public override bool Read()
switch (_valueType)
{
case JTokenType.Integer:
SetToken(JsonToken.Integer, Convert.ToInt64(_reader.Value));
SetToken(JsonToken.Integer, Convert.ToInt64(_reader.Value, CultureInfo.InvariantCulture));
break;
case JTokenType.Float:
SetToken(JsonToken.Float, Convert.ToDouble(_reader.Value));
SetToken(JsonToken.Float, Convert.ToDouble(_reader.Value, CultureInfo.InvariantCulture));
break;
case JTokenType.String:
case JTokenType.Uri:
Expand All @@ -140,10 +141,10 @@ public override bool Read()
SetToken(JsonToken.String, _reader.Value);
break;
case JTokenType.Boolean:
SetToken(JsonToken.Boolean, Convert.ToBoolean(_reader.Value));
SetToken(JsonToken.Boolean, Convert.ToBoolean(_reader.Value, CultureInfo.InvariantCulture));
break;
case JTokenType.Date:
SetToken(JsonToken.Date, Convert.ToDateTime(_reader.Value));
SetToken(JsonToken.Date, Convert.ToDateTime(_reader.Value, CultureInfo.InvariantCulture));
break;
case JTokenType.Bytes:
SetToken(JsonToken.Bytes, Convert.FromBase64String(_reader.Value));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@
<HintPath>..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Collections.Immutable, Version=1.1.33.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Reference Include="System.Collections.Immutable, Version=1.1.34.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\System.Collections.Immutable.1.1.34-rc\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
<HintPath>..\packages\System.Collections.Immutable.1.1.36\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
Expand Down

0 comments on commit 67c2090

Please sign in to comment.