-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Json format proposal for CategoryScheme and Categories #41
Comments
The downside with a flat representation of hierarchy is that the consistency of a document is not guaranteed. Furthermore the items must be correctly sorted, for ex: The parent Category A of Category B should be defined prior to Category B. |
Thanks @sosna for the recent change on step1.json Based on your model I suggest a complement for representing hierarchy of Categories: |
Thanks @OECD-BBAZART! The proposal is indeed what we had in mind, i.e. any Item/Item Scheme can hold an array of items. I will update the samples as soon as time allows but else feel free to fork the repo and send a pull request, if you want and have time. |
In this issue I would suggest a Json format for CategoryScheme and Categories:
Like AgencyScheme or Categorisation: CategoryScheme and Categories will be added to the "references" object.
Compared to the xml format: having the hierarchy of Categories represented nested I suggest a flat representation with a 'parent' link to establish the relationship between categories.
Here is an example of the parent relationship inside a Category:
"urn:sdmx:org.sdmx.infomodel.categoryscheme.Category=ESTAT:ESTAT_DATAFLOWS_SCHEME(1.2).14.14200": {
"id": "14200",
"name": "Normalisation of information systems",
"urn": "urn:sdmx:org.sdmx.infomodel.categoryscheme.Category=ESTAT:ESTAT_DATAFLOWS_SCHEME(1.2).14.14200",
"parent": {
"urn": "urn:sdmx:org.sdmx.infomodel.categoryscheme.Category=ESTAT:ESTAT_DATAFLOWS_SCHEME(1.2).14"
}
}
Full example:
From the source file: CATEGORY_SCHEME_ESTAT_DATAFLOWS_SCHEME_annotations.xml.txt
We will get: CATEGORY_SCHEME_ESTAT_DATAFLOWS_SCHEME_annotations.xml-output.json.txt
The text was updated successfully, but these errors were encountered: