All docs
V19.2
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

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 JsonDataSource object requires the open source Newtonsoft.Json library. Install the Newtonsoft.Json NuGet package in Visual Studio.

constructor

Initializes a new instance of the JsonDataSource class.

Declaration

constructor(dataSourceJSON?: any, serializer?: DevExpress.Analytics.Utils.ModelSerializer)

Optional Parameters

Name Type Default Description
dataSourceJSON any null

A JSON object used for dashboard deserialization. Do not pass this parameter directly.

serializer ModelSerializer null

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
ko.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
ko.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.