# TextControl.LoadDataFromJson 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.

- **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.LoadDataFromJson Method
- **392 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textcontrol/loaddatafromjson-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textcontrol/loaddatafromjson-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textcontrol/loaddatafromjson-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).

### Syntax

```csharp
public void LoadDataFromJson(string json);
```

```vbnet
Public Sub LoadDataFromJson(json As String)
```

### Parameters

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

### Examples

`LoadDataFromJson` is not exposed by the current ASP.NET Core editor helper. The following example uses `LoadDataFromJson` in the current server-side setup instead.

```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.IsReady Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textcontrol/isready-property/llms-full.txt)
- **Next:** [TextControl.LoadDataFromJsonAsync Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web/textcontrol/loaddatafromjsonasync-method/llms-full.txt)
