Table of Contents

Class MailFathomErrorCodeJsonConverter

Namespace
MailFathom.Domain.Failures
Assembly
MailFathom.Domain.dll

Serializes MailFathomErrorCode as its five-digit number.

public sealed class MailFathomErrorCodeJsonConverter : JsonConverter<MailFathomErrorCode>
Inheritance
MailFathomErrorCodeJsonConverter
Inherited Members

Remarks

The type carries this converter through JsonConverterAttribute, so every serializer that meets the value uses it without per-call registration. The JSON form is the number for the same reason the value object exists: the number is the published identity, and a member name would change with a rename that the code is meant to survive.

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type MailFathomErrorCode.

ReadAsPropertyName(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads a dictionary key from a JSON property name.

Write(Utf8JsonWriter, MailFathomErrorCode, JsonSerializerOptions)

Writes a specified value as JSON.

WriteAsPropertyName(Utf8JsonWriter, MailFathomErrorCode, JsonSerializerOptions)

Writes a dictionary key as a JSON property name.