redesign JSON format
Currently, the JSON format (made by mkjson.py) looks like this:
{
"0": {
"approved": "yes",
"fedora_abbrev": "0BSD",
"fedora_name": "Zero-Clause BSD",
"spdx_abbrev": "0BSD"
...
when we are already introducing incompatibility in #74 (closed) I propose changing the JSON format too. To be more in line with TOML format and be better prepared for any future changes in TOML Template.
Current issues:
- some lists in TOML are single-valued in JSON
- sections (license, fedora) in TOML are flatted or just prefixed in JSON
{
"0": {
"license": {
"expression": "0BSD",
"status": ["allowed"],
"url": "optional",
"usage": "optional",
"text": "optional",
},
"fedora": {
"legacy-name": ["Zero-Clause BSD"],
"legacy-abbreviation": ["0BSD"],
}
...
This format is a direct mirror of TEMPLATE.toml. Any change to this template can be easily mirrored to JSON. In a predictable way.
If you agree, I can prepare PR. And the JSON can contain both old and new values for some transition period, which can ease the migration of layered tools (rpmlint, license-validate....).
Comments?