Elimination of annotation dependencies in validation for Modern JSON Schema

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Attouche, Lyes, Baazizi, Mohamed-Amine, Colazzo, Dario, Ghelli, Giorgio, Klessinger, Stefan, Sartiani, Carlo, Scherzinger, Stefanie
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866916652648497152
author Attouche, Lyes
Baazizi, Mohamed-Amine
Colazzo, Dario
Ghelli, Giorgio
Klessinger, Stefan
Sartiani, Carlo
Scherzinger, Stefanie
author_facet Attouche, Lyes
Baazizi, Mohamed-Amine
Colazzo, Dario
Ghelli, Giorgio
Klessinger, Stefan
Sartiani, Carlo
Scherzinger, Stefanie
contents JSON Schema is a logical language used to define the structure of JSON values. JSON Schema syntax is based on nested schema objects. In all versions of JSON Schema until Draft-07, collectively known as Classical JSON Schema, the semantics of a schema was entirely described by the set of JSON values that it validates. This semantics was the basis for a thorough theoretical study and for the development of tools to decide satisfiability and equivalence of schemas. Unfortunately, Classical JSON Schema suffered a severe limitation in its ability to express extensions of object schemas, which caused the introduction, with Draft 2019-09, of two disruptive features: annotation dependency and dynamic references. These new features undermine the previously developed semantic theory, and the algorithms used to decide satisfiability for Classical JSON Schema are not easy to extend. One possible solution is rewriting a schema written in Modern JSON Schema into an equivalent schema in Classical JSON Schema. In this paper we prove that the elimination of annotation dependent keywords cannot, in general, avoid an exponential increase of the schema dimension. We provide an algorithm to eliminate these keywords that, despite the theoretical lower bound, behaves quite well in practice, as we verify with an extensive set of experiments.
format Preprint
id arxiv_https___arxiv_org_abs_2503_11288
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Elimination of annotation dependencies in validation for Modern JSON Schema
Attouche, Lyes
Baazizi, Mohamed-Amine
Colazzo, Dario
Ghelli, Giorgio
Klessinger, Stefan
Sartiani, Carlo
Scherzinger, Stefanie
Databases
Programming Languages
JSON Schema is a logical language used to define the structure of JSON values. JSON Schema syntax is based on nested schema objects. In all versions of JSON Schema until Draft-07, collectively known as Classical JSON Schema, the semantics of a schema was entirely described by the set of JSON values that it validates. This semantics was the basis for a thorough theoretical study and for the development of tools to decide satisfiability and equivalence of schemas. Unfortunately, Classical JSON Schema suffered a severe limitation in its ability to express extensions of object schemas, which caused the introduction, with Draft 2019-09, of two disruptive features: annotation dependency and dynamic references. These new features undermine the previously developed semantic theory, and the algorithms used to decide satisfiability for Classical JSON Schema are not easy to extend. One possible solution is rewriting a schema written in Modern JSON Schema into an equivalent schema in Classical JSON Schema. In this paper we prove that the elimination of annotation dependent keywords cannot, in general, avoid an exponential increase of the schema dimension. We provide an algorithm to eliminate these keywords that, despite the theoretical lower bound, behaves quite well in practice, as we verify with an extensive set of experiments.
title Elimination of annotation dependencies in validation for Modern JSON Schema
topic Databases
Programming Languages
url https://arxiv.org/abs/2503.11288