JsonDataSource Class |
Namespace: GroupDocs.Assembly.Data
The JsonDataSource type exposes the following members.
Name | Description | |
---|---|---|
![]() | JsonDataSource(Stream) |
Creates a new data source with data from a JSON stream using default options for parsing JSON data.
|
![]() | JsonDataSource(String) |
Creates a new data source with data from a JSON file using default options for parsing JSON data.
|
![]() | JsonDataSource(Stream, JsonDataLoadOptions) |
Creates a new data source with data from a JSON stream using the specified options for parsing JSON data.
|
![]() | JsonDataSource(String, JsonDataLoadOptions) |
Creates a new data source with data from a JSON file using the specified options for parsing JSON data.
|
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
To access data of the corresponding file or stream while assembling a document, pass an instance of this class as a data source to one of DocumentAssembler.AssembleDocument overloads.
In template documents, if a top-level JSON element is an array, a JsonDataSource instance should be treated in the same way as if it was a DataTable instance. If a top-level JSON element is an object, a JsonDataSource instance should be treated in the same way as if it was a DataRow instance. For more information, see template syntax reference (https://docs.groupdocs.com/display/assemblynet/Template+Syntax+-+Part+1+of+2#TemplateSyntax-Part1of2-UsingDataSources).
In template documents, you can work with typed values of JSON elements. For convenience, the engine replaces the set of JSON simple types with the following one:
The engine automatically recognizes values of the extra types upon their JSON representations.
To override default behavior of JSON data loading, initialize and pass a JsonDataLoadOptions instance to a constructor of this class.