* Catch excessive objects in json being parsed, even if following a comment. * Include line info on excessive content for deserialisation.
This commit is contained in:
committed by
James Newton-King
parent
76600dcc5b
commit
8956d3ca9c
@@ -173,7 +173,7 @@ namespace Newtonsoft.Json.Serialization
|
||||
{
|
||||
if (reader.TokenType != JsonToken.Comment)
|
||||
{
|
||||
throw new JsonSerializationException("Additional text found in JSON string after finishing deserializing object.");
|
||||
throw JsonSerializationException.Create(reader, "Additional text found in JSON string after finishing deserializing object.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user