Share via


AgentSessionStateBagJsonConverter Class

Definition

Custom JSON converter for AgentSessionStateBag that serializes and deserializes the internal dictionary contents rather than the container object's public properties.

public sealed class AgentSessionStateBagJsonConverter : System.Text.Json.Serialization.JsonConverter<Microsoft.Agents.AI.AgentSessionStateBag>
type AgentSessionStateBagJsonConverter = class
    inherit JsonConverter<AgentSessionStateBag>
Public NotInheritable Class AgentSessionStateBagJsonConverter
Inherits JsonConverter(Of AgentSessionStateBag)
Inheritance
AgentSessionStateBagJsonConverter

Constructors

Name Description
AgentSessionStateBagJsonConverter()

Methods

Name Description
Read(Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type T.

Write(Utf8JsonWriter, AgentSessionStateBag, JsonSerializerOptions) System.Text.Json.Serialization.JsonConverter`1.Write(System.Text.Json.Utf8JsonWriter,Microsoft.Agents.AI.AgentSessionStateBag,System.Text.Json.JsonSerializerOptions)

Applies to