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
2017-08-25, 853👍, 0💬
Popular Posts:
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...
Where to find tutorials on Using Azure API Management Developer Portal? Here is a list of tutorials ...
How to Create a New Instance of a Class? There are two ways to create a new instance (object) of a c...
What Is an HTML http-equiv "meta" Tag/Element? a http-equiv "meta" element is a special "meta" eleme...
How to use urllib.parse.urlencode() function to encode HTTP POST data? My form data has special char...