SDMX-JSON Data

From Fusion Registry Wiki
Jump to navigation Jump to search

see Data Formats

Overview

The SDMX-JSON Data format is an official SDMX format. It is a based on the JSON Specification,

SDMX-JSON was introduced in version 2.1 of the SDMX Specification to satisfy the use case of web disemination. Other then the syntax differences, SDMX-JSON differs from the ML formats (SDMX-ML Generic Data, SDMX-ML Structure Specific Data) because it transmists both the classification identifiers with the labels. This has the advantage of packaging all the information required to display a dataset in a single dataset, as oppose to the ML formats which require access to the Structural Metadata in order to decode the data.

SDMX-JSON data can be used as both an import and export format for the Fusion Registry, and an export format for the Fusion Edge Server and Fusion Data Browser.

Formatting Using Query Parameters

The following URL parameters can be used in a RESTful query for to get Generic data.

  • format = sdmx-json

Example https://demo.metadatatechnology.com/FusionRegistry/ws/public/sdmxapi/rest/data/WB,GCI,1.0/GHA.GCI..?format=sdmx-json

Note: The same formatting can be applied using HTTP Accept Headers as opposed to query parameters.

Example Output

https://demo.metadatatechnology.com/FusionRegistry/ws/public/sdmxapi/rest/data/WB,GCI,1.0/GHA.GCI..?format=sdmx-json

The output below shows the full dataset in SDMX-JSON format , the top part of the dataset contains pointers to the structure section, used to decode the dataset

		"dataSets": [
			{
				"links": [
					{
						"rel": "dataflow",
						"urn": "urn:sdmx:org.sdmx.infomodel.datastructure.Dataflow=WB:GCI(1.0)",
						"uri": "https://raw.githubusercontent.com/sdmx-twg/sdmx-json/develop/structure-message/tools/schemas/1.0/sdmx-json-structure-schema.json"
					}
				],
				"action": "Information",
				"series": {
					"0:0:0:0": {
						"attributes": [
						],
						"observations": {
							"0": [
								"102"
							],
							"1": [
								"114"
							],
							
......

		"structure": {
			"links": [
				{
					"rel": "dataflow",
					"urn": "urn:sdmx:org.sdmx.infomodel.datastructure.Dataflow=WB:GCI(1.0)",
					"uri": "https://raw.githubusercontent.com/sdmx-twg/sdmx-json/develop/structure-message/tools/schemas/1.0/sdmx-json-structure-schema.json"
				},
				{
					"rel": "datastructure",
					"urn": "urn:sdmx:org.sdmx.infomodel.datastructure.DataStructure=WB:GCI(1.0)",
					"uri": "https://raw.githubusercontent.com/sdmx-twg/sdmx-json/develop/structure-message/tools/schemas/1.0/sdmx-json-structure-schema.json"
				}
			],
			"name": "Global Competitiveness Index",
			"names": {
				"en": "Global Competitiveness Index"
			},
			"description": "Global Competitiveness Index",
			"descriptions": {
				"en": "Global Competitiveness Index"
			},
			"dimensions": {
				"dataset": [
				],
				"series": [
					{
						"id": "REF_AREA",
						"name": "Reference Area",
						"keyPosition": 0,
						"role": null,
						"values": [
							{
								"id": "GHA",
								"name": "Ghana"
							}
						]
					},