Difference between revisions of "SDMX-JSON Data"

From FMR Knowledge Base
Jump to navigation Jump to search
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:SdmxDataFormat]]
+
[[Category:FMR Formats Reference]]
 
=Overview=
 
=Overview=
 
The SDMX-JSON Data format is an official SDMX format.  It is a based on the [https://en.wikipedia.org/wiki/JSON JSON Specification],  
 
The SDMX-JSON Data format is an official SDMX format.  It is a based on the [https://en.wikipedia.org/wiki/JSON 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 was introduced in version 2.1 of the SDMX Specification to satisfy the use case of web disemination. SDMX-JSON has a different structure to the XML formats ([[SDMX-ML Generic Data]] [[SDMX-ML Structure Specific Data]]) and importantly transmists both [[component]] codes and labels.  This approach provides all the information required to display the data in a single JSON response, as opposed to the XML formats which require separate knowledge of 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.
+
SDMX-JSON data can be used as both an import and export format for the Fusion Metadata Registry.
  
=Formatting Using Query Parameters=
+
=Example=
The following URL parameters can be used in a RESTful query for to get Generic data. 
 
* format = sdmx-json
 
 
 
<strong>Example</strong>
 
<i>https://demo.metadatatechnology.com/FusionRegistry/ws/public/sdmxapi/rest/data/WB,GCI,1.0/GHA.GCI..?format=sdmx-json</i>
 
 
 
<strong>Note:</strong> The same formatting can be applied using [[Data_Formats|HTTP Accept Headers]] as opposed to query parameters.
 
 
 
=Example Output=
 
 
<i>https://demo.metadatatechnology.com/FusionRegistry/ws/public/sdmxapi/rest/data/WB,GCI,1.0/GHA.GCI..?format=sdmx-json</i>
 
<i>https://demo.metadatatechnology.com/FusionRegistry/ws/public/sdmxapi/rest/data/WB,GCI,1.0/GHA.GCI..?format=sdmx-json</i>
  

Latest revision as of 10:31, 17 March 2021

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. SDMX-JSON has a different structure to the XML formats (SDMX-ML Generic Data SDMX-ML Structure Specific Data) and importantly transmists both component codes and labels. This approach provides all the information required to display the data in a single JSON response, as opposed to the XML formats which require separate knowledge of 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 Metadata Registry.

Example

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"
							}
						]
					},