Class TelegramUpdateSerializer

Assembly: redb.Route.Telegram.dll

Deserializes a Telegram from a raw JSON byte array received
via webhook (HTTP POST from Telegram servers).

Uses — the same
that Telegram.Bot uses internally, ensuring correct handling of polymorphic
fields (e.g. MaybeInaccessibleMessage).


Serialization () is intentionally not supported:
the Telegram Bot API is inbound-only in the webhook path.

public sealed class TelegramUpdateSerializer : IMessageSerializer

Inheritance

Object→TelegramUpdateSerializer

Implements

Properties

ContentType

Content type this serializer handles (e.g., "application/json").

public string ContentType { get; }

Methods

Deserialize(byte[], Type)

Deserializes a byte array to a typed value.

public object? Deserialize(byte[] data, Type type)

Deserialize<T>(byte[])

Deserializes a byte array to a typed value.

public T? Deserialize<T>(byte[] data)

Serialize<T>(T)

Serializes a value to a byte array.

public byte[] Serialize<T>(T value)