-Added Path to JsonReaderException, JsonSchemaException and ValidationEventArgs
-Fixed Path on JsonValidatingReader -Fixed path queries over constructors
This commit is contained in:
@@ -141,6 +141,7 @@ namespace Newtonsoft.Json.Linq
|
||||
int index = (int) part;
|
||||
|
||||
JArray a = current as JArray;
|
||||
JConstructor c = current as JConstructor;
|
||||
|
||||
if (a != null)
|
||||
{
|
||||
@@ -154,6 +155,18 @@ namespace Newtonsoft.Json.Linq
|
||||
|
||||
current = a[index];
|
||||
}
|
||||
else if (c != null)
|
||||
{
|
||||
if (c.Count <= index)
|
||||
{
|
||||
if (errorWhenNoMatch)
|
||||
throw new IndexOutOfRangeException("Index {0} outside the bounds of JConstructor.".FormatWith(CultureInfo.InvariantCulture, index));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
current = c[index];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (errorWhenNoMatch)
|
||||
|
||||
Reference in New Issue
Block a user