General rule when converting checklists to JSON format: As a general rule, non-optimized OSADL OSLOC checklists in JSON format are recursive associative arrays with the language construct as key and the related dependent text such as use case, license obligation or further attributes as value, but the value may be void. For example, a simple checklist in a file named CHECKLIST may read USE CASE Source code delivery YOU MUST Forward License text YOU MUST Forward Copyright notices IF Source code modification YOU MUST Provide Modification report YOU MUST Provide Copyright notices USE CASE Binary delivery YOU MUST Provide License text In Documentation OR Distribution material which will become { "CHECKLIST": { "USE CASE": { "Binary delivery": { "YOU MUST": { "Provide License text In Documentation OR Distribution material": {} } }, "Source code delivery": { "IF": { "Source code modification": { "YOU MUST": { "Provide Copyright notices": {}, "Provide Modification report": {} } } }, "YOU MUST": { "Forward Copyright notices": {}, "Forward License text": {} } } } } } in JSON format. Arrays with empty values can be converted to a string, if a single key exists or to a list, if more keys exist. Thus, after optimization the above checklist would become: { "CHECKLIST": { "USE CASE": { "Binary delivery": { "YOU MUST": "Provide License text In Documentation OR Distribution material" }, "Source code delivery": { "IF": { "Source code modification": { "YOU MUST": [ "Provide Copyright notices", "Provide Modification report" ] } }, "YOU MUST": [ "Forward Copyright notices", "Forward License text" ] } } } } Special case: Since a particular checklist hierarchy level may contain more than a single "EITHER", "OR", "EITHER IF" or "OR IF" element that are significant in the original checklist, but are not in the JSON format because the ordering is lost, an enumeration level had to be introduced. The checklist snippet USE CASE Binary delivery EITHER YOU MUST Distribute Source code In Product OR YOU MUST Provide Delayed source code delivery OR YOU MUST Provide Source code Via Internet EITHER YOU MUST NOT Promote OR YOU MUST Credit Original authors will be converted to the JSON snippet { "CHECKLIST-2.0": { "USE CASE": { "Binary delivery": { "EITHER": { "1": { "OR": { "1": { "YOU MUST": { "Provide Delayed source code delivery": {} } }, "2": { "YOU MUST": { "Provide Source code Via Internet": {} } } }, "YOU MUST": { "Distribute Source code In Product": {} } }, "2": { "OR": { "1": { "YOU MUST": { "Credit Original authors": {} } } }, "YOU MUST NOT": { "Promote": {} } } } } } } } or after optimization to { "CHECKLIST-2.0": { "USE CASE": { "Binary delivery": { "EITHER": { "1": { "OR": { "1": { "YOU MUST": "Provide Delayed source code delivery" }, "2": { "YOU MUST": "Provide Source code Via Internet" } }, "YOU MUST": "Distribute Source code In Product" }, "2": { "OR": { "1": { "YOU MUST": "Credit Original authors" } }, "YOU MUST NOT": "Promote" } } } } } } This additional enumeration ensures that the original checklist can be reproduced from the JSON version and that several JSON checklists can be combined and thus simplified (see also this project.). JSON schema: A schema to validate license checklists in JSON format (plain and optimized version) is shown below. This is version 2 of the schema. It validates single as well as merged licenses. { "$schema": "http://json-schema.org/draft-06/schema#", "copyrightclause": { "type": "string", "enum": ["Yes", "No", "Questionable"] }, "patenthints": { "type": "string", "enum": ["Yes", "No"] }, "obligations": { "patternProperties": { "^EITHER$": { "patternProperties": { "^[0-9]*$": { "required": ["OR"], "not": { "required": ["OR IF"] }, "property": { "$ref": "#/obligations" } } }, "additionalProperties": false }, "^OR$": { "patternProperties": { "^[0-9]*$": { "$ref": "#/obligations" } }, "additionalProperties": false }, "^EITHER IF$": { "patternProperties": { "^[0-9]*$": { "patternProperties": { ".*": { "required": ["OR IF"], "not": { "required": ["OR"] }, "property": { "$ref": "#/obligations" } } }, "additionalProperties": false } } }, "^OR IF$": { "patternProperties": { "^[0-9]*$": { "patternProperties": { ".*": { "$ref": "#/obligations" } }, "additionalProperties": false } } }, "^(ATTRIBUTE|EXCEPT IF|IF|YOU MUST|YOU MUST NOT)$": { "patternProperties": { ".*": { "$ref": "#/obligations" } }, "additionalProperties": false } }, "additionalProperties": false }, "license": { "type": "object", "patternProperties": { "^[0-9A-Za-z\\.| -]*$": { "required": ["USE CASE"], "type": "object", "properties": { "USE CASE": { "type": ["string", "object"], "patternProperties": { "^.* ([Dd]elivery|service).*$": { "$ref": "#/obligations" } }, "additionalProperties": false }, "COMPATIBILITY": { "type": ["string", "array"] }, "DEPENDING COMPATIBILITY": { "type": ["string", "array"] }, "INCOMPATIBILITY": { "type": ["string", "array"] }, "INCOMPATIBLE LICENSES": { "type": ["string", "array"] }, "COPYLEFT LICENSES": { "type": ["string", "array"] }, "COPYLEFT CLAUSE": { "oneOf": [{ "type": "string", "$ref": "#/copyrightclause" },{ "type": "array", "items": { "$ref": "#/copyrightclause" } }] }, "PATENT HINTS": { "oneOf": [{ "type": "string", "$ref": "#/patenthints" },{ "type": "array", "items": { "$ref": "#/patenthints" } }] } }, "additionalProperties": false } }, "additionalProperties": false }, "type": "object", "$ref": "#/license" }