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, 1708🔥, 0💬
Popular Posts:
How to view API details on the Publisher Dashboard of an Azure API Management Service? You can follo...
How to decode the id_token value received from Google OpenID Connect authentication response? Accord...
Where to get a real Atom XML example? You can follow this tutorial to get a real Atom XML example: 1...
What validation keywords I can use in JSON Schema to specifically validate JSON Array values? The cu...
How To Break a File Path Name into Parts in PHP? If you have a file name, and want to get different ...