Class InvalidJsonException
The exception that is thrown when json input is invalid.
Namespace: Unity.Serialization.Json
Syntax
public class InvalidJsonException : Exception
Constructors
InvalidJsonException(SerializationInfo, StreamingContext)
Initializes a new instance of the InvalidJsonException class with serialized data.
Declaration
protected InvalidJsonException(SerializationInfo info, StreamingContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializationInfo | info | The |
| StreamingContext | context | The |
InvalidJsonException(String)
Initialized a new instance of the InvalidJsonException class with a specified error message.
Declaration
public InvalidJsonException(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| String | message | The message that describes the error. |
InvalidJsonException(String, Exception)
Initializes a new instance of the InvalidJsonException class with a specified error message and a reference to the inner exception that is the cause of this exception.
Declaration
public InvalidJsonException(string message, Exception inner)
Parameters
| Type | Name | Description |
|---|---|---|
| String | message | The message that describes the error. |
| Exception | inner | The inner exception reference. |
Properties
Character
The character the validator stopped at.
Declaration
public int Character { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Line
The line the validator stopped at.
Declaration
public int Line { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Methods
GetObjectData(SerializationInfo, StreamingContext)
Sets the
Declaration
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializationInfo | info | The |
| StreamingContext | context | The |