The Behavioral Diversity of Java JSON Libraries

Proceedings of the 32nd International Symposium on Software Reliability Engineering, Main track (ISSRE'21)

N. HarrandT. DurieuxD. BromanB. Baudry 

PDFDOISource code

Abstract

JSON is an essential file and data format in domains that span scientific computing, web APIs or configuration management. Its popularity has motivated significant software development effort to build multiple libraries to process JSON data. Previous studies focus on performance comparison among these libraries and lack a software engineering perspective. We present the first systematic analysis and comparison of the input / output behavior of 20 JSON libraries, in a single software ecosystem: Java/Maven. We assess behavior diversity by running each library against a curated set of 473 JSON files, including both well-formed and ill-formed files. The main design differences, which influence the behavior of the libraries, relate to the choice of data structure to represent JSON objects and to the encoding of numbers. We observe a remarkable behavioral diversity with ill-formed files, or corner cases such as large numbers or duplicate data. Our unique behavioral assessment of JSON libraries paves the way for a robust processing of ill-formed files, through a multi-version architecture.

@INPROCEEDINGS{9700248,
  author={Harrand, Nicolas and Durieux, Thomas and Broman, David and Baudry, Benoit},
  booktitle={2021 IEEE 32nd International Symposium on Software Reliability Engineering (ISSRE)}, 
  title={The Behavioral Diversity of Java JSON Libraries}, 
  year={2021},
  volume={},
  number={},
  pages={412-422},
  doi={10.1109/ISSRE52982.2021.00050}}
1
2
3
4
5
6
7
8
9
Last Updated: 31/05/2022