Nothing Special   »   [go: up one dir, main page]

Skip to main content

An Empirical Study on the “Usage of Not” in Real-World JSON Schema Documents

  • Conference paper
  • First Online:
Conceptual Modeling (ER 2021)

Part of the book series: Lecture Notes in Computer Science ((LNISA,volume 13011))

Included in the following conference series:

Abstract

We study the usage of negation in JSON Schema data modeling. Negation is a logical operator rarely present in type systems and schema description languages, since it complicates decision problems: many software tools, but also formal frameworks for working with JSON Schema, do not fully support negation. This motivates us to study whether negation is actually used in practice, for which aims, and whether it could—in principle—be replaced by simpler operators. We have collected a large corpus of 80k open source JSON Schema documents from GitHub. We perform a systematic analysis, quantify usage patterns of negation, and also qualitatively analyze schemas. We show that negation is indeed used, albeit infrequently, following a stable set of patterns.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    SchemaStore, at https://www.schemastore.org/json/, last accessed 21-Apr-2021.

References

  1. JSON Schema Test Suite (2021). https://github.com/json-schema-org/JSON-Schema-Test-Suite. version of commit hash #09fd353

  2. Attouche, L., et al.: A tool for JSON schema witness generation. In: Proceedings of EDBT 2021, pp. 694–697 (2021)

    Google Scholar 

  3. Baazizi, M.A., Colazzo, D., Ghelli, G., Sartiani, C.: Schemas and types for JSON data: from theory to practice. In: Proceedings of SIGMOD 2019, pp. 2060–2063 (2019)

    Google Scholar 

  4. Baazizi, M.A., Colazzo, D., Ghelli, G., Sartiani, C., Scherzinger, S.: Not elimination and witness generation for JSON schema. In: Proceedings of BDA 2020 (2020)

    Google Scholar 

  5. Baazizi, M.A., Colazzo, D., Ghelli, G., Sartiani, C., Scherzinger, S.: An empirical study on the “usage of not” in real-world JSON schema documents (long version). CoRR (2021). https://arxiv.org/abs/2107.08677

  6. Bex, G.J., Neven, F., den Bussche, J.V.: DTDs versus XML schema: a practical study. In: Proceedings of WebDB 2004 (2004)

    Google Scholar 

  7. Bourhis, P., Reutter, J.L., Suárez, F., Vrgoc, D.: JSON: data model, query languages and schema specification. In: Proceedings of PODS 2017, pp. 123–135 (2017)

    Google Scholar 

  8. Choi, B.: What are real DTDs like? In: Proceedings of WebDB 2002, pp. 43–48 (2002)

    Google Scholar 

  9. Friesen, J.: Extracting JSON values with JsonPath. In: Java XML and JSON: Document Processing for Java SE, pp. 299–322. Apress (2019)

    Google Scholar 

  10. Fruth, M., Baazizi, M.A., Colazzo, D., Ghelli, G., Sartiani, C., Scherzinger, S.: Challenges in checking JSON schema containment over evolving real-world schemas. In: Grossmann, G., Ram, S. (eds.) ER 2020. LNCS, vol. 12584, pp. 220–230. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-65847-2_20

    Chapter  Google Scholar 

  11. Habib, A., Shinnar, A., Hirzel, M., Pradel, M.: Finding data compatibility bugs with JSON subschema checking. In: Proceedings of ISSTA 2021, pp. 620–632 (2021)

    Google Scholar 

  12. Laender, A.H., Moro, M.M., Nascimento, C., Martins, P.: An X-ray on web-available XML schemas. SIGMOD Rec. 38(1), 37–42 (2009)

    Article  Google Scholar 

  13. Maiwald, B., Riedle, B., Scherzinger, S.: What are real JSON schemas like? In: Guizzardi, G., Gailly, F., Suzana Pitangueira Maciel, R. (eds.) ER 2019. LNCS, vol. 11787, pp. 95–105. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-34146-6_9

    Chapter  Google Scholar 

  14. Martens, W., Neven, F., Schwentick, T., Bex, G.J.: Expressiveness and complexity of XML schema. ACM Trans. Database Syst. 31(3), 770–813 (2006)

    Article  Google Scholar 

  15. MongoDB Inc.: MongoDB Manual: $jsonSchema (Version 4.4) (2021). https://docs.mongodb.com/manual/reference/operator/query/jsonSchema/

  16. json-schema org: JSON Schema (2021). https://json-schema.org

  17. Pezoa, F., Reutter, J.L., Suarez, F., Ugarte, M., Vrgoč, D.: Foundations of JSON schema. In: Proceedings of WWW 2016, pp. 263–273 (2016)

    Google Scholar 

  18. StackOverflow: JSON Schema - valid if object does *not* contain a particular property. https://stackoverflow.com/questions/30515253/json-schema-valid-if-object-does-not-contain-a-particular-property

Download references

Acknowledgments

This contribution was partly funded by Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) grant #385808805. The schemas were retrieved using Google BigQuery, supported by Google Cloud. We thank Thomas Pilz (OTH Regensburg) for his help in making the research artifacts available. We thank Michael Fruth (University of Passau) for feedback on an earlier draft.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Stefanie Scherzinger .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Baazizi, MA., Colazzo, D., Ghelli, G., Sartiani, C., Scherzinger, S. (2021). An Empirical Study on the “Usage of Not” in Real-World JSON Schema Documents. In: Ghose, A., Horkoff, J., Silva Souza, V.E., Parsons, J., Evermann, J. (eds) Conceptual Modeling. ER 2021. Lecture Notes in Computer Science(), vol 13011. Springer, Cham. https://doi.org/10.1007/978-3-030-89022-3_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-89022-3_9

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-89021-6

  • Online ISBN: 978-3-030-89022-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics