-Fixed bad BSON when writing long strings of complex UTF8 characters
-Fixed error not being raised for additional content in JSON string for JArray.Parse and JObject.Parse
This commit is contained in:
@@ -1229,7 +1229,12 @@ namespace Newtonsoft.Json.Linq
|
||||
{
|
||||
JsonReader jsonReader = new JsonTextReader(new StringReader(json));
|
||||
|
||||
return Load(jsonReader);
|
||||
JToken t = Load(jsonReader);
|
||||
|
||||
if (jsonReader.Read() && jsonReader.TokenType != JsonToken.Comment)
|
||||
throw new Exception("Additional text found in JSON string after parsing content.");
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user