1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-27128: Implement JSON Schema Validation FUNCTION

Implementation:
Implementation is made according to json schema validation draft 2020

JSON schema basically has same structure as that of json object, consisting
of key-value pairs. So it can be parsed in the same manner as
any json object.

However, none of the keywords are mandatory, so making guess about the
json value type based only on the keywords would be incorrect.
Hence we need separate objects denoting each keyword.

So during create_object_and_handle_keyword() we create appropriate objects
based on the keywords and validate each of them individually on the json
document by calling respective validate() function if the type matches.
If any of them fails, return false, else return true.
This commit is contained in:
Rucha Deodhar
2022-10-28 13:03:13 +05:30
parent af0e0ad18d
commit 358b8495f5
17 changed files with 7477 additions and 33 deletions

File diff suppressed because it is too large Load Diff