Partager via


PromptTemplateConfig.FromJson Method

Definition

Overloads

FromJson(String)

Creates a PromptTemplateConfig from the specified JSON.

FromJson(String, JsonSerializerOptions)

Creates a PromptTemplateConfig from the specified JSON.

FromJson(String)

Creates a PromptTemplateConfig from the specified JSON.

public static Microsoft.SemanticKernel.PromptTemplateConfig FromJson(string json);
static member FromJson : string -> Microsoft.SemanticKernel.PromptTemplateConfig
Public Shared Function FromJson (json As String) As PromptTemplateConfig

Parameters

json
String

A string containing a JSON representation of the PromptTemplateConfig.

Returns

The deserialized PromptTemplateConfig.

Exceptions

json is null.

json is an invalid JSON representation of a PromptTemplateConfig.

Applies to

FromJson(String, JsonSerializerOptions)

Creates a PromptTemplateConfig from the specified JSON.

public static Microsoft.SemanticKernel.PromptTemplateConfig FromJson(string json, System.Text.Json.JsonSerializerOptions jsonSerializerOptions);
static member FromJson : string * System.Text.Json.JsonSerializerOptions -> Microsoft.SemanticKernel.PromptTemplateConfig
Public Shared Function FromJson (json As String, jsonSerializerOptions As JsonSerializerOptions) As PromptTemplateConfig

Parameters

json
String

A string containing a JSON representation of the PromptTemplateConfig.

jsonSerializerOptions
JsonSerializerOptions

The JsonSerializerOptions to deserialize the prompt template config from JSON.

Returns

The deserialized PromptTemplateConfig.

Exceptions

json is null.

json is an invalid JSON representation of a PromptTemplateConfig.

Applies to