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, 1609🔥, 0💬
Popular Posts:
Where to find tutorials on Visual Studio? I want to know How to learn Visual Studio. Here is a large...
How to install "The Windows SDK version 8.1"? I need to build my Visual Studio C++ applications. If ...
How to use the RSS Online Validator at w3.org? You can follow this tutorial to learn how to use the ...
How to access Request body from "context.Request.Body" object in Azure API Policy? Request body is t...
How to reinstall npm with a node version manager? I am getting permission errors with the current ve...