Class ExceptionJsonConverter<TException>
JsonConverter that serializes and deserializes any type of Exception.
Inherited Members
Namespace: Tableau.Migration.JsonConverters
Assembly: Tableau.Migration.dll
Syntax
public class ExceptionJsonConverter<TException> : JsonConverter<TException> where TException : Exception
Type Parameters
Name | Description |
---|---|
TException | The type of the exception to convert. |
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads the JSON representation of an Exception object.
Declaration
public override TException? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
Utf8JsonReader | reader | The Utf8JsonReader to read from. |
Type | typeToConvert | The type of the object to convert. |
JsonSerializerOptions | options | The JsonSerializerOptions to use for deserialization. |
Returns
Type | Description |
---|---|
TException | The deserialized Exception object. |
Overrides
Write(Utf8JsonWriter, TException, JsonSerializerOptions)
Writes the JSON representation of an Exception object.
Declaration
public override void Write(Utf8JsonWriter writer, TException value, JsonSerializerOptions options)
Parameters
Type | Name | Description |
---|---|---|
Utf8JsonWriter | writer | The Utf8JsonWriter to write to. |
TException | value | The Exception object to serialize. |
JsonSerializerOptions | options | The JsonSerializerOptions to use for serialization. |