# TextControl.LoadDataFromJsonAsync Method

> 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.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 24.0
- **Namespace:** `TXTextControl.Web`
- **Assembly:** `TXTextControl.Web.dll`, which the TX Text Control .NET Server setup installs, for .NET Framework; in no NuGet package
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.Web > TextControl.LoadDataFromJsonAsync Method
- **433 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textcontrol/loaddatafromjsonasync-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textcontrol/loaddatafromjsonasync-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textcontrol/loaddatafromjsonasync-method/llms-full.txt

---

### 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](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textcontrol/loaddatafrommodel-method/llms-full.txt). The method returns immediately.

### Syntax

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

```vbnet
Public Async Function LoadDataFromJsonAsync(json As String) As System.Threading.Tasks.Task
```

### Parameters

| Parameter | Description |
|---|---|
| json | The JSON string containing the merge data. |

### Examples

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

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

```vbnet
Dim result = textControl.LoadDataFromJson("{""CustomerName"":""Contoso Ltd.""}")
Console.WriteLine(result)
```

---

## Nearby

- **Previous:** [TextControl.LoadDataFromJson Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textcontrol/loaddatafromjson-method/llms-full.txt)
- **Next:** [TextControl.LoadDataFromModel Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textcontrol/loaddatafrommodel-method/llms-full.txt)
