-Fixed overflow when converting incomplete JSON to XML
This commit is contained in:
@@ -916,6 +916,16 @@ namespace Newtonsoft.Json.Tests.Converters
|
||||
Assert.AreEqual(doc.InnerXml, deserializedDoc.InnerXml);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void FailOnIncomplete()
|
||||
{
|
||||
string json = @"{'Row' : ";
|
||||
|
||||
ExceptionAssert.Throws<JsonSerializationException>(
|
||||
() => JsonConvert.DeserializeXmlNode(json, "ROOT"),
|
||||
"Unexpected end when reading JSON. Path 'Row', line 1, position 9.");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DocumentDeserialize()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user