TX Text Control .NET Server

LoadDataFromJsonAsync Method

Method|Introduced in 24.0
Namespace
TXTextControl.Web
Package
None: the TX Text Control .NET Server setup installs it, for .NET Framework.
Assembly
TXTextControl.Web.dll

Description

Uses data given as a JSON string as a data source. The JSON string has to contain an array of equally structured objects. Analyzes and uses the given objects as merge data in the same way as the method LoadDataFromModel. The method returns immediately.

Syntax

public async System.Threading.Tasks.Task LoadDataFromJsonAsync(string json);

Parameters

ParameterDescription
json

The JSON string containing the merge data.

Examples

The following example uses TextControl.LoadDataFromJson in a document-processing workflow.

var result = textControl.LoadDataFromJson("{\"CustomerName\":\"Contoso Ltd.\"}");
Console.WriteLine(result);