{"id":27172075,"url":"https://github.com/pacificcommunity/sdmx-json-parser","last_synced_at":"2026-04-28T18:33:07.301Z","repository":{"id":143190167,"uuid":"599881962","full_name":"PacificCommunity/sdmx-json-parser","owner":"PacificCommunity","description":"JavaScript SDMX JSON parser","archived":false,"fork":false,"pushed_at":"2023-11-21T22:32:20.000Z","size":884,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-06T00:04:06.733Z","etag":null,"topics":["javascript","json","sdmx"],"latest_commit_sha":null,"homepage":"https://pacificcommunity.github.io/sdmx-json-parser/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PacificCommunity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-02-10T04:38:56.000Z","updated_at":"2023-07-21T03:13:09.000Z","dependencies_parsed_at":"2023-11-21T05:38:34.046Z","dependency_job_id":"57a09d72-02bd-413c-a2fe-8bb7206029a0","html_url":"https://github.com/PacificCommunity/sdmx-json-parser","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PacificCommunity%2Fsdmx-json-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PacificCommunity%2Fsdmx-json-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PacificCommunity%2Fsdmx-json-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PacificCommunity%2Fsdmx-json-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PacificCommunity","download_url":"https://codeload.github.com/PacificCommunity/sdmx-json-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248013161,"owners_count":21033316,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","json","sdmx"],"created_at":"2025-04-09T09:34:58.446Z","updated_at":"2026-04-28T18:33:07.289Z","avatar_url":"https://github.com/PacificCommunity.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SDMX-JSON parser\n\nA JavaScript library to parse [SDMX-JSON](https://github.com/sdmx-twg/sdmx-json) messages.\n\n## Installation\n\n```bash\nnpm install sdmx-json-parser\n```\n\n## Usage\n\nSDMX-JSON-parser provides a set of utility function to parse a SDMX-JSON message and extract data arrays.\n\nThe method `getDataset` must be called prior to using any other method. It takes a SDMX REST URL as first parameter and an optional `fetchOptions` object as second parameter ([doc](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options)). This fetch options can be used for instance to pass custom headers to the request like `Accept-language` to select the response language.\n\nEvery SDMX concepts (observation, dimensions, attributes) are given at observation level in the different methods (getData, getAttributes, getDimensions).\nWhen observations are organized in `series` within a `dataSet`, the parser expand them as an array of `observations` concatenating the keys.\n\n\n```javascript\nimport { SDMXParser } from sdmx-json-parser;\n\nconst sdmxDataUrl = \"https://stats-nsi-stable.pacificdata.org/rest/data/SPC,DF_IMTS,4.0/M..AMT.TB+X+M.IV+I+II+III._T._T.USD?startPeriod=2015-01\u0026dimensionAtObservation=AllDimensions\";\n\nconst parser = new SDMXParser();\nawait parser.getDataset(sdmxDataUrl);\nconst name = parser.getName();\nconst description = parser.getDescription();\nconst dimensions = parser.getDimensions();\nconst activeDimensions = parser.getActiveDimensions();\nconst annotations = parser.getAnnotations();\nconst observations = parser.getObservations();\n\ndata = sdmx.getData(); // returns a simplified array of observations with dimension and attributes values\nconst slicedData = parser.getData({GEO_PICT: ['NR']}); // slice by dimension Id (GEO_PICT) values (['NR'])\n```\n\n## Example\n\nGo to `examples/vanilla-js` folder and run a local server to see the example.\n\n```bash\nnpm run server\n```\n\n## Developer\n\n### Install dependencies\n```bash\nnpm install\n```\n### Build with webpack\n```bash\nnpm run build\n```\n### Generate documentation\n```bash\nnpm run generate-doc\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacificcommunity%2Fsdmx-json-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpacificcommunity%2Fsdmx-json-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacificcommunity%2Fsdmx-json-parser/lists"}