{ "$schema": "http://json-schema.org/draft-07/schema", "type": "array", "items": { "type": "string", "allOf": [ { "type": "string", "description": "All <> brackets come in pairs", "pattern": "^[^><]*(\\<[^>]*\\>[^><]*)*$" }, { "type": "string", "description": "All [] brackets come in pairs", "pattern": "^[^\\[\\]]*(\\[[^\\[\\]]*\\][^\\[\\]]*)*$" } ] } }