CoreActivityInput.ToJson 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
| Name | Description |
|---|---|
| ToJson() |
Serializes the current activity to a JSON string. |
| ToJson<T>(JsonTypeInfo<T>) |
Serializes the current activity to a JSON string using the specified JsonTypeInfo<T> for source-generated serialization. |
ToJson()
Serializes the current activity to a JSON string.
public virtual string ToJson();
abstract member ToJson : unit -> string
override this.ToJson : unit -> string
Public Overridable Function ToJson () As String
Returns
A JSON string representation of the activity.
Applies to
ToJson<T>(JsonTypeInfo<T>)
Serializes the current activity to a JSON string using the specified JsonTypeInfo<T> for source-generated serialization.
public string ToJson<T>(System.Text.Json.Serialization.Metadata.JsonTypeInfo<T> jsonTypeInfo) where T : Microsoft.Teams.Core.Schema.CoreActivityInput;
member this.ToJson : System.Text.Json.Serialization.Metadata.JsonTypeInfo<'T (requires 'T :> Microsoft.Teams.Core.Schema.CoreActivityInput)> -> string (requires 'T :> Microsoft.Teams.Core.Schema.CoreActivityInput)
Public Function ToJson(Of T As CoreActivityInput) (jsonTypeInfo As JsonTypeInfo(Of T)) As String
Type Parameters
- T
The type of the activity to serialize. Must inherit from CoreActivityInput.
Parameters
- jsonTypeInfo
- JsonTypeInfo<T>
The JSON type info that provides serialization metadata for type T.
Returns
A JSON string representation of the activity.