Table of Contents

Class PresentationBlockTypeJsonConverter

Namespace
MailFathom.Application.Discovery.Presentation
Assembly
MailFathom.Application.dll

Serializes PresentationBlockType as the identity the catalogue publishes.

public sealed class PresentationBlockTypeJsonConverter : JsonConverter<PresentationBlockType>
Inheritance
PresentationBlockTypeJsonConverter
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 PresentationBlockType.

ReadAsPropertyName(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads a dictionary key from a JSON property name.

Write(Utf8JsonWriter, PresentationBlockType, JsonSerializerOptions)

Writes a specified value as JSON.

WriteAsPropertyName(Utf8JsonWriter, PresentationBlockType, JsonSerializerOptions)

Writes a dictionary key as a JSON property name.