Table of Contents

Class JsonSchemaException

Namespace
Newtonsoft.Json.Schema
Assembly
Newtonsoft.Json.dll

Returns detailed information about the schema exception.

public class JsonSchemaException : Exception, ISerializable
Inheritance
JsonSchemaException
Implements
Inherited Members

Constructors

JsonSchemaException()

Initializes a new instance of the JsonSchemaException class.

public JsonSchemaException()

JsonSchemaException(SerializationInfo, StreamingContext)

Initializes a new instance of the JsonSchemaException class.

public JsonSchemaException(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The SerializationInfo that holds the serialized object data about the exception being thrown.

context StreamingContext

The StreamingContext that contains contextual information about the source or destination.

Exceptions

ArgumentNullException

The info parameter is null.

SerializationException

The class name is null or HResult is zero (0).

JsonSchemaException(string)

Initializes a new instance of the JsonSchemaException class with a specified error message.

public JsonSchemaException(string message)

Parameters

message string

The error message that explains the reason for the exception.

JsonSchemaException(string, Exception)

Initializes a new instance of the JsonSchemaException class with a specified error message and a reference to the inner exception that is the cause of this exception.

public JsonSchemaException(string message, Exception innerException)

Parameters

message string

The error message that explains the reason for the exception.

innerException Exception

The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.

Properties

LineNumber

Gets the line number indicating where the error occurred.

public int LineNumber { get; }

Property Value

int

The line number indicating where the error occurred.

LinePosition

Gets the line position indicating where the error occurred.

public int LinePosition { get; }

Property Value

int

The line position indicating where the error occurred.