# DataSourceManager.LoadJson Method

> Loads a JSON string containing an array of objects or a single object as a data source. Automatically deduces table and column names as well as data relations from property names and nested objects in the given single object or, in case of an array, the first object.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 24.0
- **Namespace:** `TXTextControl.DocumentServer.DataSources`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXDocumentServer.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDocumentServer.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.DocumentServer.DataSources > DataSourceManager.LoadJson Method
- **375 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/loadjson-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/loadjson-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/loadjson-method/llms-full.txt

---

### Description

Loads a JSON string containing an array of objects or a single object as a data source. Automatically deduces table and column names as well as data relations from property names and nested objects in the given single object or, in case of an array, the first object.

### Syntax

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

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

### Parameters

| Parameter | Description |
|---|---|
| json | A JSON string containing a single object or an array of objects. |

### Examples

The following example uses Load Json in a focused Data Source Manager workflow. The created object is then available to the surrounding document workflow.

```csharp
dataSourceManager.LoadJson("Quarterly report");
Console.WriteLine("Data Source Manager is ready for use.");
```

```vbnet
dataSourceManager.LoadJson("Quarterly report")
Console.WriteLine("Data Source Manager is ready for use.")
```

---

## Nearby

- **Previous:** [DataSourceManager.LoadDataTable Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/loaddatatable-method/llms-full.txt)
- **Next:** [DataSourceManager.LoadObjects Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/loadobjects-method/llms-full.txt)
