-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:
JamesNK
2011-11-19 03:16:04 +00:00
parent 5831b11de1
commit 9ef17d05a3
13 changed files with 100 additions and 19 deletions
@@ -1624,5 +1624,23 @@ Parameter name: arrayIndex")]
Assert.AreEqual("9065acf3-c820-467d-be50-8d4664beaf35", v.ToString());
}
[Test]
[ExpectedException(typeof(JsonReaderException), ExpectedMessage = "Unexpected state: Finished. Line 10, position 3.")]
public void ParseAdditionalContent()
{
string json = @"{
""Name"": ""Apple"",
""Expiry"": new Date(1230422400000),
""Price"": 3.99,
""Sizes"": [
""Small"",
""Medium"",
""Large""
]
}, 987987";
JObject o = JObject.Parse(json);
}
}
}