I have the following example JSON, for which I want to write a JSON Schema. The constraint is that property2 holds a list of string, which are dynamic, depending on the dataset. And in the property3 object some of the properties are named afters those strings.
{
"property1": "value",
"property2": ["value1","value2","value2"],
"property3": {
"title": "test",
"value1": "hello",
"value2": "world"
}
}
A JSON-Schema might look like this, but I don't know how to describe that the dynamic properties. Is that possible?
{
"title": "Test Object",
"type": "object",
"properties": {
"property1": {
"type": "string"
}
"property1": {
"type": "array"
}
"property3": {
"type": "object",
"properties": {
"title": {
"type": "string"
}
[ Something is missing here ]
}
}
}
}