JSON Schema Draft-07: Enhancements and Validation
JSON Schema Draft-07, published on March 19, 2018, introduces significant updates to enhance the functionality of JSON Schemas over its predecessor, Draft-06, while maintaining backward compatibility is not its primary focus. This draft includes several key documents, such as the Core, Validation, and Hyper-Schema specifications. Notable authors for Draft-07 include Austin Wright and Henry Andrews.
The Validation specification within JSON Schema aims to define criteria for a JSON document (an ‘instance’) to meet by utilizing various keywords. These keywords describe the meaning of JSON documents and provide assertions about what constitutes a valid document. For instance, the ‘type’ keyword is crucial for validating data types. Developers can access comprehensive reference documentation on the [json-schema.org](https://json-schema.org/understanding-json-schema/reference) website, covering topics from basic data types to advanced techniques like conditional validation and schema composition.
It’s important to note that earlier versions, such as Draft-05 (published October 13, 2016), primarily focused on cleaning up Draft-04 and continued to use Draft-04 meta-schemas. Draft-07 superseded some ‘draft-handrews-*-00’ versions due to identified errors and unclear sections, replacing them with ‘draft-handrews-*-01’ versions.
For those looking for guidance, JSON Schema provides resources like community forums on GitHub and Slack, and welcomes contributions to its documentation. The official website, [json-schema.org](https://json-schema.org/), serves as a central hub for specifications, tools, and guides related to JSON Schema.
Le détail sur les ‘draft-handrews-*-01’ pour corriger les erreurs m’a bien plu, ça montre qu’ils veulent vraiment stabiliser le truc.
Carrément, ça montre qu’ils veulent pas laisser traîner les bugs !
C’est clair, mais parfois ça paraît encore un peu tôt pour parler de vraie stabilisation.
J’ai vraiment pigé l’importance du keyword ‘type’ pour valider mes données JSON. Ca simplifie grave le taf quand tu veux être sûr que tout est bien formaté.