错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Optimistic Data Generation for JSON Schema

  • Lyes Attouche,
  • Mohamed-Amine Baazizi,
  • Dario Colazzo

摘要

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 \(\mathtt {\small 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 \(\mathtt {\small 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.