-Changed LINQ to JSON load methods to support reading past preceding comments
This commit is contained in:
@@ -187,6 +187,11 @@ namespace Newtonsoft.Json.Linq
|
||||
throw JsonReaderException.Create(reader, "Error reading JConstructor from JsonReader.");
|
||||
}
|
||||
|
||||
while (reader.TokenType == JsonToken.Comment)
|
||||
{
|
||||
reader.Read();
|
||||
}
|
||||
|
||||
if (reader.TokenType != JsonToken.StartConstructor)
|
||||
throw JsonReaderException.Create(reader, "Error reading JConstructor from JsonReader. Current JsonReader item is not a constructor: {0}".FormatWith(CultureInfo.InvariantCulture, reader.TokenType));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user