Hi, I'm wondering if anyone could clarify something i'm stuck on.
i have some json i want to validate. it is in the following format :
{
"fixedKey": {
"1": {}
}
}
In the object the key "fixedKey" will never change, it is hard coded in the structure.
The key "1" I wish to validate, but it could be any numerical value so i've written the json schema below to check it's of the pattern [0-9]*
{
"type": "object",
"properties": {
"fixedKey": {
"type": "object",
"patternProperties": {
"[0-9]*": {}
}
}
}
}
the json always passes even if the second key is not numeric.
could someone point out where i've gone wrong please
thanks :-)