Skip to content

JsonBotAPI

Namespace: Signal.Bot.Serialization

Full Name: Signal.Bot.Serialization.JsonBotAPI

Summary

Provides centralized JSON serialization configuration for the Signal Bot API client with source-generated serialization support.

Properties

Options

Gets the configured JsonSerializerOptions instance for Signal Bot API serialization. Includes snake_case naming policy, custom converters for enums and timestamps, and source-generated type information for improved performance.

Methods

#cctor

csharp
#cctor()

Initializes the static members with configured serialization options and type information resolvers.

Get

csharp
Get(key)

Retrieves the JsonTypeInfo for a specified type from the pre-registered type information dictionary.

Parameters:

  • key - The Type for which to retrieve type information.

Returns: The JsonTypeInfo associated with the specified type.

Exceptions:

  • System.InvalidOperationException - Thrown when no type information is registered for the specified type.

Get``1

csharp
Get``1()

Retrieves the strongly-typed JsonTypeInfo1` for a specified type parameter.

Returns: The JsonTypeInfo1` associated with the specified type.

Exceptions:

  • System.InvalidOperationException - Thrown when no type information is registered for the specified type.