Class JsonSerializationException
- Namespace
- Newtonsoft.Json
- Assembly
- Newtonsoft.Json.dll
The exception thrown when an error occurs during Json serialization or deserialization.
public class JsonSerializationException : Exception, ISerializable
- Inheritance
-
JsonSerializationException
- Implements
- Inherited Members
Constructors
JsonSerializationException()
Initializes a new instance of the JsonSerializationException class.
public JsonSerializationException()
JsonSerializationException(SerializationInfo, StreamingContext)
Initializes a new instance of the JsonSerializationException class.
public JsonSerializationException(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfoThe SerializationInfo that holds the serialized object data about the exception being thrown.
context
StreamingContextThe 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).
JsonSerializationException(string)
Initializes a new instance of the JsonSerializationException class with a specified error message.
public JsonSerializationException(string message)
Parameters
message
stringThe error message that explains the reason for the exception.
JsonSerializationException(string, Exception)
Initializes a new instance of the JsonSerializationException class with a specified error message and a reference to the inner exception that is the cause of this exception.
public JsonSerializationException(string message, Exception innerException)