Table of Contents

Class MailDocumentBlockTypeJsonConverter

Namespace
MailFathom.Application.EmailContent.Rendering.Document
Assembly
MailFathom.Application.dll

Serializes MailDocumentBlockType as the identity the catalogue publishes.

public sealed class MailDocumentBlockTypeJsonConverter : JsonConverter<MailDocumentBlockType>
Inheritance
MailDocumentBlockTypeJsonConverter
Inherited Members

Remarks

The type carries this converter through JsonConverterAttribute, so every serializer that meets the value writes the identity rather than an ordinal — a position would silently change meaning the first time the catalogue were reordered, while the identity is what a client's renderers are keyed by.

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type MailDocumentBlockType.

Write(Utf8JsonWriter, MailDocumentBlockType, JsonSerializerOptions)

Writes a specified value as JSON.