JsonDataSource Class
A data source that retrieves data stored in JSON format.
Declaration
export class JsonDataSource extends DataSource
Remarks
The DashboardJsonDataSource allows you to extract JSON data from a Web-service endpoint URI, text file, or a string in JSON format.
Important
The DashboardJsonDataSource
object requires the System.Text.Json library. .NET projects do not require manual installation of the System.Text.Json package, as it is already included in the .NET environment. Set the DevExpress.DataAccess.Native.Json.JsonLoaderHelper.ProcessingLibrary
property to NewtonsoftJson
to use the Newtonsoft.Json library instead. Then, install the Newtonsoft.Json NuGet package.
Inherited Members
Inheritance
constructor
Initializes a new instance of the JsonDataSource
class.
Declaration
constructor(
dataSourceJSON?: any,
serializer?: DevExpress.Analytics.Utils.ModelSerializer
)
Parameters
Name | Type | Description |
---|---|---|
dataSourceJSON | any | A JSON object used for dashboard deserialization. Do not pass this parameter directly. |
serializer | ModelSerializer | An object used for dashboard deserialization. Do not pass this parameter directly. |
Properties
rootElement Property
Specifies a root JSON node.
Declaration
rootElement: ko.Observable<string>
Property Value
Type | Description |
---|---|
Observable<string> | A string that is the root node’s name. |
schema Property
Gets a JSON data source schema.
Declaration
schema: ko.Observable<DevExpress.Analytics.Data.JsonSchemaRootNode>
Property Value
Type | Description |
---|---|
Observable<JsonSchemaRootNode> | A JSON data source schema. |
Methods
getDisplayNamePrefix Method
Gets the display name of the current data source.
Declaration
getDisplayNamePrefix(): string
Returns
Type | Description |
---|---|
string | A string that is the display name of the current data source. |
getInfo Method
For internal use.
Declaration
getInfo(): DevExpress.Analytics.Utils.ISerializationInfoArray
Returns
Type | Description |
---|---|
ISerializationInfoArray | An array of objects that provide serialization info. |