JsonDataSource Class

Provides access to data of a JSON file or stream to be used within a report.
Inheritance Hierarchy
SystemObject
  Aspose.Words.ReportingJsonDataSource

Namespace:  Aspose.Words.Reporting
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public class JsonDataSource

The JsonDataSource type exposes the following members.

Constructors
  NameDescription
Public methodJsonDataSource(Stream)
Creates a new data source with data from a JSON stream.
Public methodJsonDataSource(String)
Creates a new data source with data from a JSON file.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)
Remarks

To access data of the corresponding file or stream while generating a report, pass an instance of this class as a data source to one of ReportingEngine.BuildReport 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.aspose.com/display/wordsnet/Template+Syntax).

In template documents, you can work with typed values of JSON elements. For convenience, the engine replaces the set of simple JSON types with the following one:

The engine automatically recognizes values of the extra types upon their JSON representations.

See Also