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

Foundations of JSON Schema

Authors Info & Claims
Published:11 April 2016Publication 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.Google ScholarGoogle Scholar
  2. Swagger: The World's Most Popular Framework for APIs. http://swagger.io/, 2015.Google ScholarGoogle Scholar
  3. Wikimedia. https://www.wikimedia.org/, 2015.Google ScholarGoogle Scholar
  4. J. Berman. JSON Schema Test Suite. https://github.com/json-schema/JSON-Schema-Test-Suite, 2015.Google ScholarGoogle Scholar
  5. T. Bray. The JavaScript Object Notation (JSON) Data Interchange Format. 2014.Google ScholarGoogle Scholar
  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.Google ScholarGoogle Scholar
  7. T. H. Cormen, C. Stein, R. L. Rivest, and C. E. Leiserson. Introduction to Algorithms. McGraw-Hill Higher Education, 2nd edition, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. B. Courcelle. The monadic second-order logic of graphs. I. Recognizable sets of finite graphs. Information and Computation, 85(1):12 -- 75, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. ECMA. The JSON Data Interchange Format . http://www.ecma-international.org/publications/standards/Ecma-404.htm, 2013.Google ScholarGoogle Scholar
  10. F. Galiegue and K. Zyp. Json schema: Core definitions and terminology. http://json-schema.org/latest/json-schema-core.html, 2013.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Google. Google API Discovery Service. https://developers.google.com/discovery/, 2015.Google ScholarGoogle Scholar
  13. I. G. group. Heroics: Ruby HTTP client for APIs represented with JSON schema. https://github.com/interagent/heroics, 2013.Google ScholarGoogle Scholar
  14. I. G. group. Prmd: JSON Schema tools and documentation generation for HTTP APIs. https://github.com/interagent/prmd, 2013.Google ScholarGoogle Scholar
  15. I. G. group. Schematics: A Go point of view on JSON Schema. https://github.com/interagent/schematic, 2013.Google ScholarGoogle Scholar
  16. L. Hilaiel. Orderly. http://orderly-json.org/, 2015.Google ScholarGoogle Scholar
  17. J. E. Hopcroft, R. Motwani, and J. D. Ullman. Introduction to automata theory, languages, and computation - international edition (2. ed). Addison-Wesley, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Internet Engineering Task Force (IETF). JavaScript Object Notation (JSON) Pointer. https://tools.ietf.org/html/rfc6901, April 2013.Google ScholarGoogle Scholar
  19. Internet Engineering Task Force (IETF). The JavaScript Object Notation (JSON) Data Interchange Format. https://tools.ietf.org/html/rfc7159, March 2014.Google ScholarGoogle Scholar
  20. json-schema.org: The home of json schema. http://json-schema.org/.Google ScholarGoogle Scholar
  21. L. Libkin. Elements of Finite Model Theory. Springer, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. L. Libkin. Logics for unranked trees: An overview. Logical Methods in Computer Science, 2(3), 2006. Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. MongoDB Inc. The MongoDB3.0 Manual. https://docs.mongodb.org/manual/, 2015.Google ScholarGoogle Scholar
  25. RethinkDB: The open-source database for the realtime web. https://www.rethinkdb.com/, 2015.Google ScholarGoogle Scholar
  26. J. L. Reutter, F. Suárez, M. Ugarte, and D. Vrgo\vc. JSON Schema: syntax and semantics. http://cswr.github.io/JsonSchema/, 2015.Google ScholarGoogle Scholar
  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.Google ScholarGoogle Scholar
  28. The Apache Software Foundation. Apache CouchDB. http://couchdb.apache.org/, 2015.Google ScholarGoogle Scholar
  29. The International Organization for Standardization (ISO). ISO/IEC 14977:1996 - Extended BNF. http://www.iso.org/iso/catalogue_detail?csnumber=26153, 1996.Google ScholarGoogle Scholar
  30. The RAML Workgroup. RAML: RESTful API Modeling Language. http://raml.org/, 2015.Google ScholarGoogle Scholar
  31. D. Vrandecic and M. Krötzsch. Wikidata: a free collaborative knowledgebase. Commun. ACM, 57(10):78--85, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Wikidata. Wikidata:Database download. https://www.wikidata.org/wiki/Wikidata:Database_download, 2015.Google ScholarGoogle Scholar
  33. Wikimedia. Wikidata: The Free Knowledge Base. http://www.wikidata.org, October 2015.Google ScholarGoogle Scholar

Index Terms

  1. Foundations of JSON Schema

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • 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

        Copyright © 2016 Copyright is held by the International World Wide Web Conference Committee (IW3C2)

        Publisher

        International World Wide Web Conferences Steering Committee

        Republic and Canton of Geneva, Switzerland

        Publication History

        • Published: 11 April 2016

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        WWW '16 Paper Acceptance Rate115of727submissions,16%Overall Acceptance Rate1,899of8,196submissions,23%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader