Class AgentMessageIdJsonConverter
- Namespace
- MailFathom.Application.Agent.Conversations
- Assembly
- MailFathom.Application.dll
Serializes AgentMessageId as the bare UUID a turn is addressed by.
public sealed class AgentMessageIdJsonConverter : JsonConverter<AgentMessageId>
- Inheritance
-
AgentMessageIdJsonConverter
- Inherited Members
Remarks
Every entry of a conversation names the turn it belongs to, so this identifier is in every stored payload. Without a converter it would be written as the object its property list describes and read back as nothing at all — the struct has no settable member for the serializer to fill, so the unmapped token is dropped in silence and every entry returns naming the empty turn. That is not a failure anything would report: the entries read back as their own kinds and only the fold notices, when the second turn of a conversation collides with the first on one empty identity.
Methods
- Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads and converts the JSON to type AgentMessageId.
- Write(Utf8JsonWriter, AgentMessageId, JsonSerializerOptions)
Writes a specified value as JSON.