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, ∼2800🔥, 0💬
Popular Posts:
What is Fabric CA (Certificate Authority)? Fabric CA (Certificate Authority) is a component of Hyper...
How to view API details on the Publisher Dashboard of an Azure API Management Service? You can follo...
What Is Azure API Management Service? Azure API Management as a turnkey solution for publishing APIs...
Where can I download the EPUB 2.0 sample book "The Problems of Philosophy" by Lewis Theme? You can f...
How to install "The Windows SDK version 8.1"? I need to build my Visual Studio C++ applications. If ...