Change - Heaps of small changes and bug fixes around LINQ to JSON. Many unit tests added.

Change - CultureInfo is now always passed into FormatWith
This commit is contained in:
JamesNK
2008-04-04 22:45:52 +00:00
parent e469918596
commit ffe2d91279
34 changed files with 1104 additions and 262 deletions
+2 -1
View File
@@ -30,6 +30,7 @@ using System.IO;
using System.Xml;
using Newtonsoft.Json.Utilities;
using Newtonsoft.Json.Linq;
using System.Globalization;
namespace Newtonsoft.Json
{
@@ -513,7 +514,7 @@ namespace Newtonsoft.Json
State newState = stateArray[token, (int)_currentState];
if (newState == State.Error)
throw new JsonWriterException("Token {0} in state {1} would result in an invalid JavaScript object.".FormatWith(tokenBeingWritten.ToString(), _currentState.ToString()));
throw new JsonWriterException("Token {0} in state {1} would result in an invalid JavaScript object.".FormatWith(CultureInfo.InvariantCulture, tokenBeingWritten.ToString(), _currentState.ToString()));
if ((_currentState == State.Object || _currentState == State.Array || _currentState == State.Constructor) && tokenBeingWritten != JsonToken.Comment)
{