JSON Schema Draft-07: Enhancements and Validation

Conception graphique abstraite avec lignes et formes géométriques.

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.

A lire aussi  Pourquoi le Xiaomi 17 Ultra avec son zoom optique hors normes et sa batterie colossale attire tous les regards

Vous aimerez aussi

5 commentaires

  1. 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.

  2. 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é.

  3. Le truc avec le keyword ‘type’, ça m’a bien aidé pour éviter des bugs chelous dans mes schémas JSON.

Répondre à Alice D. Annuler la réponse

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *