Open pkiraly opened 11 months ago
@nichtich @timathom I have implemented what Jakob suggested, but I have two notes:
codelists
section. Those which occur only once remained in their original place.codelists
section appears at the end of the file. Is it OK, or should it appear at the beginning of the file?An example:
"013": {
...
"subfields": {
...
"b": {
"label": "Country",
"repeatable": false,
"codes": "https://www.loc.gov/marc/countries/countries_code.html"
},
...
}
}
then the codelist might be a pure list of codes
"codelists": {
"https://www.loc.gov/marc/countries/countries_code.html": {
"aa": {
"label": "Albania"
},
"abc": {
"label": "Alberta"
},
...
}
}
or it might have additional metadata, such as a name:
"codelists": {
"https://www.loc.gov/marc/countries/countries_code.html": {
"name": "MARC Code List for Countries", ← here is the name of the code list
"codes": {
"aa": {
"label": "Albania"
},
"abc": {
"label": "Alberta"
},
...
}
}
Having only some codelists under codelists
is ok and the position of this key does not matter as JSON knowns no key order. The extension of referenced codelists with metadata makes sense. This requires a breaking change in Avram specification but its worth to do. See https://github.com/gbv/avram/issues/37
code lists should be reorganize so that they should be references.
Originally posted by @pkiraly in https://github.com/pkiraly/qa-catalogue/issues/45#issuecomment-1782642514