PromptTemplateConfig.FromJson Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.