JsonException
The exception thrown when an error occurs during JSON serialization or deserialization.
using System;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace Newtonsoft.Json
{
[Serializable]
[System.Runtime.CompilerServices.NullableContext(1)]
[System.Runtime.CompilerServices.Nullable(0)]
public class JsonException : Exception
{
public JsonException()
{
}
public JsonException(string message)
: base(message)
{
}
public JsonException(string message, [System.Runtime.CompilerServices.Nullable(2)] Exception innerException)
: base(message, innerException)
{
}
public JsonException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
internal static JsonException Create(IJsonLineInfo lineInfo, string path, string message)
{
message = JsonPosition.FormatMessage(lineInfo, path, message);
return new JsonException(message);
}
}
}