Tools, FAQ, Tutorials:
JSON Schema Example
Where to get a simple example of JSON Schema?
✍: FYIcenter.com
Here is simple JSON Schema example, called Person_Schema.json:
{ "title": "Person", "type": "object", "properties": { "firstName": { "type": "string" }, "lastName": { "type": "string" }, "age": { "description": "Age in years", "type": "integer", "minimum": 0 } }, "required": ["firstName", "lastName"] }
The above JSON schema defines the structure of JSON text strings that provide "Person" information. You can use to validate JSON text strings.
For example, the following JSON text string is valid as a "Person":
{ "firstName": "John", "lastName": "Smith", "age": 25 }
The following JSON text string is invalid as a "Person", because the required "firstName" and "lastName" properties are missing. And the "name" property is not allowed according to the JSON schema.
{ "name": "John Smith", "age": 25 }
Â
⇒Introduction of JSON Schema
⇒⇒JSON Tutorials
2018-02-01, 1216👍, 0💬
Popular Posts:
How to dump (or encode, serialize) a Python object into a JSON string using json.dumps()? The json.d...
How to Create a New Instance of a Class? There are two ways to create a new instance (object) of a c...
How To Move Uploaded Files To Permanent Directory in PHP? PHP stores uploaded files in a temporary d...
How to create a new API on the Publisher Dashboard of an Azure API Management Service? If you are ne...
Where to find tutorials on how to create Your Own Functions in PHP? A collection of tutorials to ans...