LoadDataFromJsonAsync Method
- 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);Public Async Function LoadDataFromJsonAsync(json As String) As System.Threading.Tasks.TaskParameters
| Parameter | Description |
|---|---|
| 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);Dim result = textControl.LoadDataFromJson("{""CustomerName"":""Contoso Ltd.""}")
Console.WriteLine(result)