Tools, FAQ, Tutorials:
Multiple JSON Schema Validation Keywords
How multiple Validation Keywords work in JSON Schema?
✍: FYIcenter.com
Multiple Validation Keywords work in JSON Schema with the "AND" logic.
The order of validation keywords is not important.
In other words, all of them are applied individually to the JSON instance based their specified conditions.
For example, the following schema requires the JSON instance must a JSON String AND match the given regular expression pattern:
JSON Schema:
{
"pattern": ".*@.*",
"type": "string",
"minLength": 15
}
{"enum": ["YES", "NO"]}
Valid JSON instance:
help@fyicenter.com
Invalid JSON instance:
"to@bbc.com"
Invalid JSON instance:
3.1415926535897932384626433
⇒ JSON Type Definitions and References
2017-08-25, ∼3067🔥, 0💬
Popular Posts:
Where to find tutorials on PHP language? I want to know how to learn PHP. Here is a large collection...
How to use the "@{...}" expression block in Azure API Policy? The "@{...}" expression block in Azure...
What properties and functions are supported on http.client.HTTPResponse objects? If you get an http....
Where to find EPUB Sample Files? Here is a list of EPUB sample files collected by FYIcenter.com team...
How To Convert a Character to an ASCII Value? If you want to convert characters to ASCII values, you...