TY - CHAP
T1 - Optimistic Data Generation for JSON Schema
AU - Attouche, Lyes
AU - Baazizi, Mohamed Amine
AU - Colazzo, Dario
N1 - Publisher Copyright:
© The Author(s), under exclusive license to Springer-Verlag GmbH, DE, part of Springer Nature 2024.
PY - 2024/1/1
Y1 - 2024/1/1
N2 - JSON Schema is an expressive schema language for describing JSON documents which combines structural assertions with Boolean operators, including negation, and is able to express recursion. In typical situations, JSON Schema is used to validate JSON documents to ensure safety of operations processing these JSONdata. In many other situations, it is important to generate JSONdocuments starting from a JSON Schema schema as it allows for testing applications and for assessing interesting properties like scalability of processing engines. While existing work [6, 8] addressed the witness generation problem, by discarding the uniqueItems operator, our goal lifts this restriction and addresses the problem of generating multiple instances from a given schema. Since the witness generation problem, which is equivalent to checking the satisfiability in JSON Schema, is known to be EXPTIME-complete even when uniqueItems is absent [10], our solution adopts an optimistic approach which trades completeness for soundness and efficiency. From a practical point of view, our approach is very satisfactory since, on most real-life scenarios, it is very efficient and highly precise, as testified by our experiments.
AB - JSON Schema is an expressive schema language for describing JSON documents which combines structural assertions with Boolean operators, including negation, and is able to express recursion. In typical situations, JSON Schema is used to validate JSON documents to ensure safety of operations processing these JSONdata. In many other situations, it is important to generate JSONdocuments starting from a JSON Schema schema as it allows for testing applications and for assessing interesting properties like scalability of processing engines. While existing work [6, 8] addressed the witness generation problem, by discarding the uniqueItems operator, our goal lifts this restriction and addresses the problem of generating multiple instances from a given schema. Since the witness generation problem, which is equivalent to checking the satisfiability in JSON Schema, is known to be EXPTIME-complete even when uniqueItems is absent [10], our solution adopts an optimistic approach which trades completeness for soundness and efficiency. From a practical point of view, our approach is very satisfactory since, on most real-life scenarios, it is very efficient and highly precise, as testified by our experiments.
KW - Data Generation
KW - JSON
KW - JSON Schema
U2 - 10.1007/978-3-662-69603-3_5
DO - 10.1007/978-3-662-69603-3_5
M3 - Chapter
AN - SCOPUS:85202554651
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 119
EP - 152
BT - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
PB - Springer Science and Business Media Deutschland GmbH
ER -