<PackageReference Include="Newtonsoft.Json" Version="6.0.2" />

JsonException

public class JsonException : Exception
The exception thrown when an error occurs during Json serialization or deserialization.
using System; using System.Runtime.Serialization; namespace Newtonsoft.Json { [Serializable] public class JsonException : Exception { public JsonException() { } public JsonException(string message) : base(message) { } public JsonException(string message, 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); } } }