{
"anyOf": [{
"@type": "Person",
"description": "Reusable person definition",
"properties": {
"affiliation": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"sameAs": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
}
},
"required": ["name"],
"optional": ["sameAs", "url"]
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"familyName": {
"type": "string"
},
"givenName": {
"type": "string"
},
"identifier": {
"type": "string"
},
"role": {
"type": "string"
},
"title": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri"
}
},
"required": [
"name"
],
"recommended: ["
familyName ", "
givenName ", "
identifier "],
"optional": ["affiliation", "email", "role", "title", "url"]
"type": "object"
},
{
"items": {
"@type": "Person",
"description": "Reusable person definition",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"type": "array"
},
{
"@type": "Organization",
"description": "Reusable organization definition",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
{
"items": {
"@type": "Organization",
"description": "Reusable organization definition",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"type": "array"
}
]
}
editor:1 Uncaught SyntaxError: Unexpected non-whitespace character after JSON at position 7
Uncaught SyntaxError: Unexpected token 'f', ..."mended: ["familyName"... is not valid JSON
Describe the bug
In the schema editor, I'm creating Common Validation properties. It's a bit tricky to hand-write .json and easy to introduce errors. When there's a typo/json-syntax error, a
SyntaxErroris created in the console, but the user has no indication that there's something wrong w/ the the input. It's easy to assume that the definition was saved -- when it wasn't.To Reproduce
Steps to reproduce the behavior:
Try to declare this as a validation object ;).
Error output
You get console errors like:
Expected behavior