Class JsonWriterException
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 JsonWriterException : JsonException, _Exception, ISerializable
Constructors
| Improve this Doc View SourceJsonWriterException()
Initializes a new instance of the JsonWriterException class.
Declaration
public JsonWriterException()
JsonWriterException(SerializationInfo, StreamingContext)
Initializes a new instance of the JsonWriterException class.
Declaration
public JsonWriterException(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown. |
System.Runtime.Serialization.StreamingContext | context | The System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.Runtime.Serialization.SerializationException | The class name is null or System.Exception.HResult is zero (0). |
JsonWriterException(String)
Initializes a new instance of the JsonWriterException class with a specified error message.
Declaration
public JsonWriterException(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The error message that explains the reason for the exception. |
JsonWriterException(String, Exception)
Initializes a new instance of the JsonWriterException class with a specified error message and a reference to the inner exception that is the cause of this exception.
Declaration
public JsonWriterException(string message, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The error message that explains the reason for the exception. |
System.Exception | 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. |
JsonWriterException(String, Exception, String)
Declaration
public JsonWriterException(string message, Exception innerException, string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | |
System.Exception | innerException | |
System.String | path |
Properties
| Improve this Doc View SourcePath
Gets the path to the JSON where the error occurred.
Declaration
public string Path { get; }
Property Value
Type | Description |
---|---|
System.String | The path to the JSON where the error occurred. |
Methods
| Improve this Doc View SourceCreate(JsonWriter, String, Exception)
Declaration
public static JsonWriterException Create(JsonWriter writer, string message, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
JsonWriter | writer | |
System.String | message | |
System.Exception | ex |
Returns
Type | Description |
---|---|
JsonWriterException |
Create(String, String, Exception)
Declaration
public static JsonWriterException Create(string path, string message, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | |
System.String | message | |
System.Exception | ex |
Returns
Type | Description |
---|---|
JsonWriterException |