MergeJsonData Method
- Namespace
TXTextControl.DocumentServer
- Package
TXTextControl.asTextControl. Core. SDK TXDocumentServer.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXDocumentServer.dll
Description
Merges data given as a JSON string into a document template. The JSON string has to contain either a single object or an array of equally structured objects. Analyzes and uses the given object(s) as merge data in the same way as the method MergeObjects.
Syntax
MergeJsonData(string, bool)
Merges data given as a JSON string into a document template. The JSON string has to contain either a single object or an array of equally structured objects.
public void MergeJsonData(string json, bool append);Public Sub MergeJsonData(json As String, append As Boolean)| Parameter | Description |
|---|---|
| json | The JSON string containing the merge data. |
| append | Specifies whether the merge result should be merged into one document or split into separate documents. |
MergeJsonData(string)
Does the same as MergeJsonData with the parameter “append” set to true.
public void MergeJsonData(string json);Public Sub MergeJsonData(json As String)| Parameter | Description |
|---|---|
| json | The JSON string containing the merge data. |
Examples
The following example uses Merge Json Data in a focused Mail Merge workflow. The created object is then available to the surrounding document workflow.
mailMerge.MergeJsonData("Quarterly report", true);
Console.WriteLine("Mail Merge is ready for use.");mailMerge.MergeJsonData("Quarterly report", True)
Console.WriteLine("Mail Merge is ready for use.")