skip to main content
10.1145/2872427.2883029acmotherconferencesArticle/Chapter ViewAbstractPublication PagesthewebconfConference Proceedingsconference-collections
research-article

Foundations of JSON Schema

Published: 11 April 2016 Publication History

Abstract

JSON -- the most popular data format for sending API requests and responses -- is still lacking a standardized schema or meta-data definition that allows the developers to specify the structure of JSON documents. JSON Schema is an attempt to provide a general purpose schema language for JSON, but it is still work in progress, and the formal specification has not yet been agreed upon. Why this could be a problem becomes evident when examining the behaviour of numerous tools for validating JSON documents against this initial schema proposal: although they agree on most general cases, when presented with the greyer areas of the specification they tend to differ significantly. In this paper we provide the first formal definition of syntax and semantics for JSON Schema and use it to show that implementing this layer on top of JSON is feasible in practice. This is done both by analysing the theoretical aspects of the validation problem and by showing how to set up and validate a JSON Schema for Wikidata, the central storage for Wikimedia.

References

[1]
Online Appendix. http://web.ing.puc.cl/~jreutter/JSch, 2015.
[2]
Swagger: The World's Most Popular Framework for APIs. http://swagger.io/, 2015.
[3]
Wikimedia. https://www.wikimedia.org/, 2015.
[4]
J. Berman. JSON Schema Test Suite. https://github.com/json-schema/JSON-Schema-Test-Suite, 2015.
[5]
T. Bray. The JavaScript Object Notation (JSON) Data Interchange Format. 2014.
[6]
H. Comon, M. Dauchet, R. Gilleron, C. Löding, F. Jacquemard, D. Lugiez, S. Tison, and M. Tommasi. Tree automata techniques and applications, 2007. release October, 12th 2007.
[7]
T. H. Cormen, C. Stein, R. L. Rivest, and C. E. Leiserson. Introduction to Algorithms. McGraw-Hill Higher Education, 2nd edition, 2001.
[8]
B. Courcelle. The monadic second-order logic of graphs. I. Recognizable sets of finite graphs. Information and Computation, 85(1):12 -- 75, 1990.
[9]
ECMA. The JSON Data Interchange Format . http://www.ecma-international.org/publications/standards/Ecma-404.htm, 2013.
[10]
F. Galiegue and K. Zyp. Json schema: Core definitions and terminology. http://json-schema.org/latest/json-schema-core.html, 2013.
[11]
L. M. Goldschlager. The Monotone and Planar Circuit Value Problems Are Log Space Complete for P. SIGACT News, 9(2):25--29, July 1977.
[12]
Google. Google API Discovery Service. https://developers.google.com/discovery/, 2015.
[13]
I. G. group. Heroics: Ruby HTTP client for APIs represented with JSON schema. https://github.com/interagent/heroics, 2013.
[14]
I. G. group. Prmd: JSON Schema tools and documentation generation for HTTP APIs. https://github.com/interagent/prmd, 2013.
[15]
I. G. group. Schematics: A Go point of view on JSON Schema. https://github.com/interagent/schematic, 2013.
[16]
L. Hilaiel. Orderly. http://orderly-json.org/, 2015.
[17]
J. E. Hopcroft, R. Motwani, and J. D. Ullman. Introduction to automata theory, languages, and computation - international edition (2. ed). Addison-Wesley, 2003.
[18]
Internet Engineering Task Force (IETF). JavaScript Object Notation (JSON) Pointer. https://tools.ietf.org/html/rfc6901, April 2013.
[19]
Internet Engineering Task Force (IETF). The JavaScript Object Notation (JSON) Data Interchange Format. https://tools.ietf.org/html/rfc7159, March 2014.
[20]
json-schema.org: The home of json schema. http://json-schema.org/.
[21]
L. Libkin. Elements of Finite Model Theory. Springer, 2004.
[22]
L. Libkin. Logics for unranked trees: An overview. Logical Methods in Computer Science, 2(3), 2006.
[23]
W. Martens, F. Neven, T. Schwentick, and G. J. Bex. Expressiveness and complexity of xml schema. ACM Transactions on Database Systems (TODS), 31(3):770--813, 2006.
[24]
MongoDB Inc. The MongoDB3.0 Manual. https://docs.mongodb.org/manual/, 2015.
[25]
RethinkDB: The open-source database for the realtime web. https://www.rethinkdb.com/, 2015.
[26]
J. L. Reutter, F. Suárez, M. Ugarte, and D. Vrgo\vc. JSON Schema: syntax and semantics. http://cswr.github.io/JsonSchema/, 2015.
[27]
M. Sporny, G. Kellogg, and M. Lanthaler. JSON-LD 1.0: A JSON-based Serialization for Linked Data. http://www.w3.org/TR/json-ld/, January 2014.
[28]
The Apache Software Foundation. Apache CouchDB. http://couchdb.apache.org/, 2015.
[29]
The International Organization for Standardization (ISO). ISO/IEC 14977:1996 - Extended BNF. http://www.iso.org/iso/catalogue_detail?csnumber=26153, 1996.
[30]
The RAML Workgroup. RAML: RESTful API Modeling Language. http://raml.org/, 2015.
[31]
D. Vrandecic and M. Krötzsch. Wikidata: a free collaborative knowledgebase. Commun. ACM, 57(10):78--85, 2014.
[32]
Wikidata. Wikidata:Database download. https://www.wikidata.org/wiki/Wikidata:Database_download, 2015.
[33]
Wikimedia. Wikidata: The Free Knowledge Base. http://www.wikidata.org, October 2015.

Cited By

View all
  • (2025)JuMonC: A RESTful tool for enabling monitoring and control of simulations at scaleFuture Generation Computer Systems10.1016/j.future.2024.107541164(107541)Online publication date: Mar-2025
  • (2024)Machine Learning-Assisted Identification of Single-Layer Graphene via Color Variation AnalysisNanomaterials10.3390/nano1402018314:2(183)Online publication date: 12-Jan-2024
  • (2024)Large Language Model-Driven Structured Output: A Comprehensive Benchmark and Spatial Data Generation FrameworkISPRS International Journal of Geo-Information10.3390/ijgi1311040513:11(405)Online publication date: 10-Nov-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Other conferences
WWW '16: Proceedings of the 25th International Conference on World Wide Web
April 2016
1482 pages
ISBN:9781450341431

Sponsors

  • IW3C2: International World Wide Web Conference Committee

In-Cooperation

Publisher

International World Wide Web Conferences Steering Committee

Republic and Canton of Geneva, Switzerland

Publication History

Published: 11 April 2016

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. JSON
  2. JSON schema
  3. JSON validation
  4. expressiveness of schema languages

Qualifiers

  • Research-article

Funding Sources

  • Millennium Nucleus Center for Semantic Web Research

Conference

WWW '16
Sponsor:
  • IW3C2
WWW '16: 25th International World Wide Web Conference
April 11 - 15, 2016
Québec, Montréal, Canada

Acceptance Rates

WWW '16 Paper Acceptance Rate 115 of 727 submissions, 16%;
Overall Acceptance Rate 1,899 of 8,196 submissions, 23%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)388
  • Downloads (Last 6 weeks)37
Reflects downloads up to 10 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2025)JuMonC: A RESTful tool for enabling monitoring and control of simulations at scaleFuture Generation Computer Systems10.1016/j.future.2024.107541164(107541)Online publication date: Mar-2025
  • (2024)Machine Learning-Assisted Identification of Single-Layer Graphene via Color Variation AnalysisNanomaterials10.3390/nano1402018314:2(183)Online publication date: 12-Jan-2024
  • (2024)Large Language Model-Driven Structured Output: A Comprehensive Benchmark and Spatial Data Generation FrameworkISPRS International Journal of Geo-Information10.3390/ijgi1311040513:11(405)Online publication date: 10-Nov-2024
  • (2024)Mapping Hierarchical File Structures to Semantic Data Models for Efficient Data Integration into Research Data Management SystemsData10.3390/data90200249:2(24)Online publication date: 26-Jan-2024
  • (2024)Cross-Feature Transfer Learning for Efficient Tensor Program GenerationApplied Sciences10.3390/app1402051314:2(513)Online publication date: 6-Jan-2024
  • (2024)Schema Extraction in NoSQL Databases: A Systematic Literature ReviewRecent Advances in Computer Science and Communications10.2174/012666255827343723120406110617:8Online publication date: Nov-2024
  • (2024)FaaSr: R Package for Function-as-a-Service Cloud ComputingJournal of Open Source Software10.21105/joss.070279:103(7027)Online publication date: Nov-2024
  • (2024)cuallee: A Python package for data quality checks across multiple DataFrame APIsJournal of Open Source Software10.21105/joss.066849:98(6684)Online publication date: Jun-2024
  • (2024)ReCG: Bottom-up JSON Schema Discovery Using a Repetitive Cluster-and-Generalize FrameworkProceedings of the VLDB Endowment10.14778/3681954.368201917:11(3538-3550)Online publication date: 30-Aug-2024
  • (2024)CytoPipeline and CytoPipelineGUI: a Bioconductor R package suite for building and visualizing automated pre-processing pipelines for flow cytometry dataBMC Bioinformatics10.1186/s12859-024-05691-z25:1Online publication date: 20-Feb-2024
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media