The JSON Data Provider supports following options under the Connection section in Report Data Source dialog.
In the Content tab, specify the type of JSON data source. The options available for specifying the JSON data are as follows:
The JSON schema describes the structure of a JSON data. In ActiveReports, the JSON data provider uses the JSON schema to obtain fields. For more information on JSON schema, please see http://json-schema.org/latest/json-schema-core.html.
The keywords of JSON schema that are supported in the JSON data provider are:
"items" : [ {...}, {...}, {...} ]
is not supported because it contains multiple values. See here for more information on items keyword.$ref
keyword. See here for more information on definitions keyword.{ $ref : #/definitions/... }
) references are supported.In the Schema tab, select the JSON schema file corresponding to your JSON data. The options available for specifying the JSON schema are:
JSON connection string has two parts - jsondoc or jsondata and schemadoc or schemadata.
jsondoc=C:\Data\customers.json;schemadata={
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"address": {
"type": "object",
"properties": {
"streetAddress": {
"type": "string"
},
"city": {
"type": "string"
}
},
"required": [
"streetAddress",
"city"
]
},
"phoneNumber": {
"type": "array",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string"
},
"code": {
"type": "integer"
}
},
"required": [
"location",
"code"
]
}
}
},
"required": [
"address",
"phoneNumber"
]
}
For example, the following connnection string is invalid:
="jsondata={ "Name": "Name"};schemadata={ "$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {}, "id": "http://example.com/example.json",
"properties": { "Name": { "id": "/properties/Name",
"type": "string" } }, "type": "object"}"
Use the following instead:
="jsondata={ 'Name': 'Name'};schemadata={ '$schema': 'http://json-schema.org/draft-04/schema#',
'definitions': {}, 'id': 'http://example.com/example.json',
'properties': { 'Name': { 'id': '/properties/Name',
'type': 'string' } }, 'type': 'object'}"