Tools, FAQ, Tutorials:
Implicit and Explicit ID of JSON Type
What are differences of the implicit ID and the explicit ID of a JSON type in JSON Schema?
✍: FYIcenter.com
If a JSON type is defined under a "definitions" property,
it could have two identifications:
1. Implicit identification: The implicit identification of a JSON type is an internal bookmark in the form of "#/definitions/xxx", where "xxx" is the type name. For example, the JSON type in the following JSON schema has an implicit identification of "#/definitions/rating":
{
"definitions": {
"rating": {
"type": "integer",
}
},
...
}
2. Explicit identification: The explicit identification of a JSON type is the identification assigned by the "$id" property. For example, the JSON type in the following JSON schema has an explicit identification of "#point":
{
"definitions": {
"rating": {
"$id": "#point",
"type": "integer",
}
},
...
}
Following JSON schema shows a JSON type called "rating" that can be referenced internally with two identifications: "#/definitions/rating" and "#point":
{
"definitions": {
"rating": {
"$id": "#point",
"type": "integer",
"minimum": 0,
"maximum": 5
}
},
"type": "object",
"properties": {
"clarity": {
"$ref": "#/definitions/rating"
},
"efficiency": {
"$ref": "#point"
}
}
}
2017-08-20, ∼2368🔥, 0💬
Popular Posts:
What is EPUB 3.0 Metadata "dc:publisher" and "dc:rights" elements? EPUB 3.0 Metadata "dc:publisher" ...
How To Get the Minimum or Maximum Value of an Array in PHP? If you want to get the minimum or maximu...
How to build a PHP script to dump Azure AD 2.0 Authentication Response? If you are use the Azure-AD-...
How to use the "@(...)" expression in Azure API Policy? The "@(...)" expression in Azure API Policy ...
How to create a "Sign-up or Sign-in" user flow policy in my Azure AD B2C directory? If you want to b...