Class JsonReaderException
The exception thrown when an error occurs while reading JSON text.
Implements
Inherited Members
Namespace: Bayat.Json
Assembly: Bayat.Json.Runtime.dll
Syntax
[Serializable]
public class JsonReaderException : JsonException, _Exception, ISerializable
Constructors
| Improve this Doc View SourceJsonReaderException()
Initializes a new instance of the Json
Declaration
public JsonReaderException()
JsonReaderException(SerializationInfo, StreamingContext)
Initializes a new instance of the Json
Declaration
public JsonReaderException(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System. |
info | The System. |
System. |
context | The System. |
Exceptions
Type | Condition |
---|---|
System. |
The |
System. |
The class name is null or System. |
JsonReaderException(String)
Initializes a new instance of the Json
Declaration
public JsonReaderException(string message)
Parameters
Type | Name | Description |
---|---|---|
System. |
message | The error message that explains the reason for the exception. |
JsonReaderException(String, Exception)
Initializes a new instance of the Json
Declaration
public JsonReaderException(string message, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
System. |
message | The error message that explains the reason for the exception. |
System. |
innerException | The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. |
JsonReaderException(String, Exception, String, Int32, Int32)
Declaration
public JsonReaderException(string message, Exception innerException, string path, int lineNumber, int linePosition)
Parameters
Type | Name | Description |
---|---|---|
System. |
message | |
System. |
innerException | |
System. |
path | |
System. |
lineNumber | |
System. |
linePosition |
Properties
| Improve this Doc View SourceLineNumber
Gets the line number indicating where the error occurred.
Declaration
public int LineNumber { get; }
Property Value
Type | Description |
---|---|
System. |
The line number indicating where the error occurred. |
LinePosition
Gets the line position indicating where the error occurred.
Declaration
public int LinePosition { get; }
Property Value
Type | Description |
---|---|
System. |
The line position indicating where the error occurred. |
Path
Gets the path to the JSON where the error occurred.
Declaration
public string Path { get; }
Property Value
Type | Description |
---|---|
System. |
The path to the JSON where the error occurred. |
Methods
| Improve this Doc View SourceCreate(IJsonLineInfo, String, String, Exception)
Declaration
public static JsonReaderException Create(IJsonLineInfo lineInfo, string path, string message, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
IJson |
lineInfo | |
System. |
path | |
System. |
message | |
System. |
ex |
Returns
Type | Description |
---|---|
Json |
Create(JsonReader, String)
Declaration
public static JsonReaderException Create(JsonReader reader, string message)
Parameters
Type | Name | Description |
---|---|---|
Json |
reader | |
System. |
message |
Returns
Type | Description |
---|---|
Json |
Create(JsonReader, String, Exception)
Declaration
public static JsonReaderException Create(JsonReader reader, string message, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
Json |
reader | |
System. |
message | |
System. |
ex |
Returns
Type | Description |
---|---|
Json |