LoadJson Method
- Namespace
TXTextControl.DocumentServer. DataSources
- Package
TXTextControl.asTextControl. WPF. SDK TXDocumentServer.from the private NuGet feed or Text Control Offline Packagesdll
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
public void LoadJson(string json);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.
dataSourceManager.LoadJson("Quarterly report");
Console.WriteLine("Data Source Manager is ready for use.");dataSourceManager.LoadJson("Quarterly report")
Console.WriteLine("Data Source Manager is ready for use.")