I\'m trying to deserialize object derived from Exception class:
[Serializable]
public class Error : Exception, ISerializable
{
public string ErrorMessage
Alternatively, you can choose the OptIn strategy and define the properties that should be processed. In case of your example:
[JsonObject(MemberSerialization.OptIn)]
public class Error : Exception, ISerializable
{
[JsonProperty(PropertyName = "error")]
public string ErrorMessage { get; set; }
[JsonConstructor]
public Error() { }
}
(Credits go to this library)