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 }
2018-02-01, 1586🔥, 0💬
Popular Posts:
How To Merge Cells in a Column? If you want to merge multiple cells vertically in a row, you need to...
How to use "link" command tool to link objet files? If you have object files previously compiled by ...
How To Convert a Character to an ASCII Value? If you want to convert characters to ASCII values, you...
How to make application release build with Visual Studio 2017? If you want to make a final release b...
How to use the JSON to XML Conversion Tool at freeformatter.com? If you want to try the JSON to XML ...