# OPTION 1: list of objects --------- YAML --------- - lfn: "f.a" pfn: "file:///Volumes/data/input/f.a" site: "local" - lfn: "f.a" pfn: "file:///Volumes/data/input/f.a" site: "local" regex: true other: "stuff" --------- SCHEMA --------- { "$schema": "http://json-schema.org/schema#", "$id": "http://yourdoamin.com/schemas/myschema.json", "type": "array", "items": { "type": "object", "properties": { "lfn": { "type": "string" }, "pfn": { "type": "string" }, "site": { "type": "string" }, "regex": { "type": "boolean" } }, "required": ["lfn", "pfn", "site"] } } # OPTION 2: list of tuples (personally don't like this too much) --------- YAML --------- # [LFN, PFN, SITE, REGEX] - ["f.a", "file:///Volumes/data/input/f.a", "local"] - ["f.a", "file:///Volumes/data/input/f.a", "local", true] --------- SCHEMA --------- { "$schema": "http://json-schema.org/schema#", "$id": "http://yourdoamin.com/schemas/myschema.json", "type": "array", "items": { "type": "array", "items": [ { "type": "string" }, { "type": "string" }, { "type": "string" }, { "type": "boolean" } ], "minItems": 3 } } # OPTION 3: single object, lfn as keys --------- YAML --------- # both properties cannot have the same name or else they will # overwrite each other when read in f.a: pfn: "file:///Volumes/data/input/f.a" site: "local" other: "stuff" f.aa: pfn: "file:///Volumes/data/input/f.a" site: "local" regex: true --------- SCHEMA --------- { "$schema": "http://json-schema.org/schema#", "$id": "http://yourdoamin.com/schemas/myschema.json", "type": "object", "propertyNames": { "pattern": "^[A-Za-z_][A-Za-z0-9_\\.]*$" }, "patternProperties": { "^[A-Za-z_][A-Za-z0-9_\\.]*$": { "type": "object", "properties": { "pfn": { "type": "string" }, "site": { "type": "string" }, "regex": { "type": "boolean" } }, "required": ["pfn", "site"] } } }