...
Code Block |
---|
{ "brand": "brand1", "model": "modelA", "color": "red", "date": "20 March 2019", "value": "hamster" } |
Pattern validation is done by specifying specific expressions that correlate with the desired functionality. In this example the code checks for the presence of 6 digits and 3 Uppercase characters:
Code Block | ||
---|---|---|
| ||
{
"type":"string",
"pattern":"\\d{6}[A-Z]{3}"
} |
Another pattern validation example checks for the presence of a specific email address format:
Code Block | ||
---|---|---|
| ||
{
"type":"string",
"pattern":".+@.+\\..+"
} |
For further information on how to use JSON schema, see https://json-schema.org/.
...