-Added Path to JsonReaderException, JsonSchemaException and ValidationEventArgs
-Fixed Path on JsonValidatingReader -Fixed path queries over constructors
This commit is contained in:
@@ -241,19 +241,10 @@ namespace Newtonsoft.Json
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the culture used when reading JSON. Defaults to <see cref="CultureInfo.InvariantCulture"/>.
|
||||
/// </summary>
|
||||
public CultureInfo Culture
|
||||
{
|
||||
get { return _culture ?? CultureInfo.InvariantCulture; }
|
||||
set { _culture = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path of the current JSON token.
|
||||
/// </summary>
|
||||
public string Path
|
||||
public virtual string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -264,6 +255,15 @@ namespace Newtonsoft.Json
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the culture used when reading JSON. Defaults to <see cref="CultureInfo.InvariantCulture"/>.
|
||||
/// </summary>
|
||||
public CultureInfo Culture
|
||||
{
|
||||
get { return _culture ?? CultureInfo.InvariantCulture; }
|
||||
set { _culture = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="JsonReader"/> class with the specified <see cref="TextReader"/>.
|
||||
/// </summary>
|
||||
@@ -596,7 +596,7 @@ namespace Newtonsoft.Json
|
||||
linePosition = 0;
|
||||
}
|
||||
|
||||
return new JsonReaderException(message, ex, lineNumber, linePosition);
|
||||
return new JsonReaderException(message, ex, Path, lineNumber, linePosition);
|
||||
}
|
||||
|
||||
internal static string FormatExceptionMessage(IJsonLineInfo lineInfo, string message)
|
||||
|
||||
Reference in New Issue
Block a user