JSON Schema Validation with MySQL 8.0.17
JSON has become the standard document interchange format over the last several years. MySQL 5.7 added a native JSON data type and it has been greatly enhanced with version 8.0. But many in the relational world have complained the the NoSQL approach does not allow you to have rigor on your data. That is to make sure an integer value is really an integer and within specified ranges or string of the proper length. And there was no way to make sure that email addresses are not listed under a combination of E-mail, e-mail, eMail, and eMAIL. JSON is great for many things but traditional, normalized data was better for making certain that your data matched what was specified.
If only there was a way to enforce come rigor on JSON data! Or a way to annotate (pronounced 'document') your JSON data. Well there is. MySQL 8.0.17 has added the ability to validate JSON documents against a schema following the guidelines of the JSON-Schema.org's fourth draft standard. You can find both the manual page 12.17.7 JSON Schema Validation Functions and the JSON Schema information online.
https://elephantdolphin.blogspot.com/2019/07/json-schema-validation-with-mysql-8017.html
Dave Stokes
MySQL Community Manager
Oracle Corporation
Subject
Views
Written By
Posted
JSON Schema Validation with MySQL 8.0.17
1644
July 22, 2019 07:29AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.