Validation of Modern JSON Schema: Formalization and Complexity

JSON Schema is the de-facto standard schema language for JSON data. The language went through many minor revisions, but the most recent versions of the language added two novel features, dynamic references and annotation-dependent validation, that change the evaluation model. Modern JSON Schema is t...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Attouche, Lyes, Baazizi, Mohamed-Amine, Colazzo, Dario, Ghelli, Giorgio, Sartiani, Carlo, Scherzinger, Stefanie
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page
container_issue
container_start_page
container_title
container_volume
creator Attouche, Lyes
Baazizi, Mohamed-Amine
Colazzo, Dario
Ghelli, Giorgio
Sartiani, Carlo
Scherzinger, Stefanie
description JSON Schema is the de-facto standard schema language for JSON data. The language went through many minor revisions, but the most recent versions of the language added two novel features, dynamic references and annotation-dependent validation, that change the evaluation model. Modern JSON Schema is the name used to indicate all versions from Draft 2019-09, which are characterized by these new features, while Classical JSON Schema is used to indicate the previous versions. These new "modern" features make the schema language quite difficult to understand, and have generated many discussions about the correct interpretation of their official specifications; for this reason we undertook the task of their formalization. During this process, we also analyzed the complexity of data validation in Modern JSON Schema, with the idea of confirming the PTIME complexity of Classical JSON Schema validation, and we were surprised to discover a completely different truth: data validation, that is expected to be an extremely efficient process, acquires, with Modern JSON Schema features, a PSPACE complexity. In this paper, we give the first formal description of Modern JSON Schema, which we consider a central contribution of the work that we present here. We then prove that its data validation problem is PSPACE-complete. We prove that the origin of the problem lies in dynamic references, and not in annotation-dependent validation. We study the schema and data complexities, showing that the problem is PSPACE-complete with respect to the schema size even with a fixed instance, but is in PTIME when the schema is fixed and only the instance size is allowed to vary. Finally, we run experiments that show that there are families of schemas where the difference in asymptotic complexity between dynamic and static references is extremely visible, even with small schemas.
doi_str_mv 10.48550/arxiv.2307.10034
format Article
fullrecord <record><control><sourceid>arxiv_GOX</sourceid><recordid>TN_cdi_arxiv_primary_2307_10034</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>2307_10034</sourcerecordid><originalsourceid>FETCH-LOGICAL-a674-67c94a949cb52d367983dc42723e735a4aa005c59abc1b5d88e8ce8b24b718c3</originalsourceid><addsrcrecordid>eNotj7tuwjAYRr0wIOABmOoXSHB8ie0OlaoI2iIoQxBr9PuCaimJkUEV8PS0wPQtR5_OQWhakJwrIcgM0jn85pQRmReEMD5Ebztog4NTiD2Oe7yOzqceL-vNN67tj-_gFS9i6v6g6wOC3uEqdofWn8PpMkaDPbRHP3nuCNWL-bb6zFabj6_qfZVBKXlWSqs5aK6tEdSxUmrFnOVUUuYlE8ABCBFWaDC2MMIp5ZX1ylBuZKEsG6GXx-vdvzmk0EG6NP8dzb2D3QCowEIC</addsrcrecordid><sourcetype>Open Access Repository</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>Validation of Modern JSON Schema: Formalization and Complexity</title><source>arXiv.org</source><creator>Attouche, Lyes ; Baazizi, Mohamed-Amine ; Colazzo, Dario ; Ghelli, Giorgio ; Sartiani, Carlo ; Scherzinger, Stefanie</creator><creatorcontrib>Attouche, Lyes ; Baazizi, Mohamed-Amine ; Colazzo, Dario ; Ghelli, Giorgio ; Sartiani, Carlo ; Scherzinger, Stefanie</creatorcontrib><description>JSON Schema is the de-facto standard schema language for JSON data. The language went through many minor revisions, but the most recent versions of the language added two novel features, dynamic references and annotation-dependent validation, that change the evaluation model. Modern JSON Schema is the name used to indicate all versions from Draft 2019-09, which are characterized by these new features, while Classical JSON Schema is used to indicate the previous versions. These new "modern" features make the schema language quite difficult to understand, and have generated many discussions about the correct interpretation of their official specifications; for this reason we undertook the task of their formalization. During this process, we also analyzed the complexity of data validation in Modern JSON Schema, with the idea of confirming the PTIME complexity of Classical JSON Schema validation, and we were surprised to discover a completely different truth: data validation, that is expected to be an extremely efficient process, acquires, with Modern JSON Schema features, a PSPACE complexity. In this paper, we give the first formal description of Modern JSON Schema, which we consider a central contribution of the work that we present here. We then prove that its data validation problem is PSPACE-complete. We prove that the origin of the problem lies in dynamic references, and not in annotation-dependent validation. We study the schema and data complexities, showing that the problem is PSPACE-complete with respect to the schema size even with a fixed instance, but is in PTIME when the schema is fixed and only the instance size is allowed to vary. Finally, we run experiments that show that there are families of schemas where the difference in asymptotic complexity between dynamic and static references is extremely visible, even with small schemas.</description><identifier>DOI: 10.48550/arxiv.2307.10034</identifier><language>eng</language><subject>Computer Science - Databases ; Computer Science - Programming Languages</subject><creationdate>2023-07</creationdate><rights>http://creativecommons.org/licenses/by/4.0</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>228,230,776,881</link.rule.ids><linktorsrc>$$Uhttps://arxiv.org/abs/2307.10034$$EView_record_in_Cornell_University$$FView_record_in_$$GCornell_University$$Hfree_for_read</linktorsrc><backlink>$$Uhttps://doi.org/10.48550/arXiv.2307.10034$$DView paper in arXiv$$Hfree_for_read</backlink></links><search><creatorcontrib>Attouche, Lyes</creatorcontrib><creatorcontrib>Baazizi, Mohamed-Amine</creatorcontrib><creatorcontrib>Colazzo, Dario</creatorcontrib><creatorcontrib>Ghelli, Giorgio</creatorcontrib><creatorcontrib>Sartiani, Carlo</creatorcontrib><creatorcontrib>Scherzinger, Stefanie</creatorcontrib><title>Validation of Modern JSON Schema: Formalization and Complexity</title><description>JSON Schema is the de-facto standard schema language for JSON data. The language went through many minor revisions, but the most recent versions of the language added two novel features, dynamic references and annotation-dependent validation, that change the evaluation model. Modern JSON Schema is the name used to indicate all versions from Draft 2019-09, which are characterized by these new features, while Classical JSON Schema is used to indicate the previous versions. These new "modern" features make the schema language quite difficult to understand, and have generated many discussions about the correct interpretation of their official specifications; for this reason we undertook the task of their formalization. During this process, we also analyzed the complexity of data validation in Modern JSON Schema, with the idea of confirming the PTIME complexity of Classical JSON Schema validation, and we were surprised to discover a completely different truth: data validation, that is expected to be an extremely efficient process, acquires, with Modern JSON Schema features, a PSPACE complexity. In this paper, we give the first formal description of Modern JSON Schema, which we consider a central contribution of the work that we present here. We then prove that its data validation problem is PSPACE-complete. We prove that the origin of the problem lies in dynamic references, and not in annotation-dependent validation. We study the schema and data complexities, showing that the problem is PSPACE-complete with respect to the schema size even with a fixed instance, but is in PTIME when the schema is fixed and only the instance size is allowed to vary. Finally, we run experiments that show that there are families of schemas where the difference in asymptotic complexity between dynamic and static references is extremely visible, even with small schemas.</description><subject>Computer Science - Databases</subject><subject>Computer Science - Programming Languages</subject><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2023</creationdate><recordtype>article</recordtype><sourceid>GOX</sourceid><recordid>eNotj7tuwjAYRr0wIOABmOoXSHB8ie0OlaoI2iIoQxBr9PuCaimJkUEV8PS0wPQtR5_OQWhakJwrIcgM0jn85pQRmReEMD5Ebztog4NTiD2Oe7yOzqceL-vNN67tj-_gFS9i6v6g6wOC3uEqdofWn8PpMkaDPbRHP3nuCNWL-bb6zFabj6_qfZVBKXlWSqs5aK6tEdSxUmrFnOVUUuYlE8ABCBFWaDC2MMIp5ZX1ylBuZKEsG6GXx-vdvzmk0EG6NP8dzb2D3QCowEIC</recordid><startdate>20230719</startdate><enddate>20230719</enddate><creator>Attouche, Lyes</creator><creator>Baazizi, Mohamed-Amine</creator><creator>Colazzo, Dario</creator><creator>Ghelli, Giorgio</creator><creator>Sartiani, Carlo</creator><creator>Scherzinger, Stefanie</creator><scope>AKY</scope><scope>GOX</scope></search><sort><creationdate>20230719</creationdate><title>Validation of Modern JSON Schema: Formalization and Complexity</title><author>Attouche, Lyes ; Baazizi, Mohamed-Amine ; Colazzo, Dario ; Ghelli, Giorgio ; Sartiani, Carlo ; Scherzinger, Stefanie</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-a674-67c94a949cb52d367983dc42723e735a4aa005c59abc1b5d88e8ce8b24b718c3</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2023</creationdate><topic>Computer Science - Databases</topic><topic>Computer Science - Programming Languages</topic><toplevel>online_resources</toplevel><creatorcontrib>Attouche, Lyes</creatorcontrib><creatorcontrib>Baazizi, Mohamed-Amine</creatorcontrib><creatorcontrib>Colazzo, Dario</creatorcontrib><creatorcontrib>Ghelli, Giorgio</creatorcontrib><creatorcontrib>Sartiani, Carlo</creatorcontrib><creatorcontrib>Scherzinger, Stefanie</creatorcontrib><collection>arXiv Computer Science</collection><collection>arXiv.org</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext_linktorsrc</fulltext></delivery><addata><au>Attouche, Lyes</au><au>Baazizi, Mohamed-Amine</au><au>Colazzo, Dario</au><au>Ghelli, Giorgio</au><au>Sartiani, Carlo</au><au>Scherzinger, Stefanie</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Validation of Modern JSON Schema: Formalization and Complexity</atitle><date>2023-07-19</date><risdate>2023</risdate><abstract>JSON Schema is the de-facto standard schema language for JSON data. The language went through many minor revisions, but the most recent versions of the language added two novel features, dynamic references and annotation-dependent validation, that change the evaluation model. Modern JSON Schema is the name used to indicate all versions from Draft 2019-09, which are characterized by these new features, while Classical JSON Schema is used to indicate the previous versions. These new "modern" features make the schema language quite difficult to understand, and have generated many discussions about the correct interpretation of their official specifications; for this reason we undertook the task of their formalization. During this process, we also analyzed the complexity of data validation in Modern JSON Schema, with the idea of confirming the PTIME complexity of Classical JSON Schema validation, and we were surprised to discover a completely different truth: data validation, that is expected to be an extremely efficient process, acquires, with Modern JSON Schema features, a PSPACE complexity. In this paper, we give the first formal description of Modern JSON Schema, which we consider a central contribution of the work that we present here. We then prove that its data validation problem is PSPACE-complete. We prove that the origin of the problem lies in dynamic references, and not in annotation-dependent validation. We study the schema and data complexities, showing that the problem is PSPACE-complete with respect to the schema size even with a fixed instance, but is in PTIME when the schema is fixed and only the instance size is allowed to vary. Finally, we run experiments that show that there are families of schemas where the difference in asymptotic complexity between dynamic and static references is extremely visible, even with small schemas.</abstract><doi>10.48550/arxiv.2307.10034</doi><oa>free_for_read</oa></addata></record>
fulltext fulltext_linktorsrc
identifier DOI: 10.48550/arxiv.2307.10034
ispartof
issn
language eng
recordid cdi_arxiv_primary_2307_10034
source arXiv.org
subjects Computer Science - Databases
Computer Science - Programming Languages
title Validation of Modern JSON Schema: Formalization and Complexity
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-29T03%3A51%3A55IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-arxiv_GOX&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Validation%20of%20Modern%20JSON%20Schema:%20Formalization%20and%20Complexity&rft.au=Attouche,%20Lyes&rft.date=2023-07-19&rft_id=info:doi/10.48550/arxiv.2307.10034&rft_dat=%3Carxiv_GOX%3E2307_10034%3C/arxiv_GOX%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true