The Behavioral Diversity of Java JSON Libraries

04/29/2021
by   Nicolas Harrand, et al.
0

JSON is a popular file and data format that is precisely specified by the IETF in RFC 8259. Yet, this specification implicitly and explicitly leaves room for many design choices when it comes to parsing and generating JSON. This yields the opportunity of diverse behavior among independent implementations of JSON libraries. A thorough analysis of this diversity can be used by developers to choose one implementation or to design a resilient multi-version architecture. We present the first systematic analysis and comparison of the input / output behavior of 20 JSON libraries, in Java. We analyze the diversity of architectural choices among libraries, and we execute each library with well-formed and ill-formed JSON files to assess their behavior. We first find that the data structure selected to represent JSON objects and the encoding of numbers are the main design differences, which influence the behavior of the libraries. Second, we observe that the libraries behave in a similar way with regular, well-formed JSON files. However, there is a remarkable behavioral diversity with ill-formed files, or corner cases such as large numbers or duplicate data.

READ FULL TEXT
research
03/13/2019

The Emergence of Software Diversity in Maven Central

Maven artifacts are immutable: an artifact that is uploaded on Maven Cen...
research
08/18/2021

Generation of TypeScript Declaration Files from JavaScript Code

Developers are starting to write large and complex applications in TypeS...
research
11/04/2021

Automatic Diversity in the Software Supply Chain

Despite its obvious benefits, the increased adoption of package managers...
research
02/22/2022

XtraLibD: Detecting Irrelevant Third-Party libraries in Java and Python Applications

Software development comprises the use of multiple Third-Party Libraries...
research
12/04/2022

Visualizing Contributor Code Competency for PyPI Libraries: Preliminary Results

Python is known to be used by beginners to professional programmers. Pyt...
research
05/19/2020

Choreographies as Objects

We present Choral, the first framework for programming choreographies (m...
research
04/22/2021

On Buggy Resizing Libraries and Surprising Subtleties in FID Calculation

We investigate the sensitivity of the Fréchet Inception Distance (FID) s...

Please sign up or login with your details

Forgot password? Click here to reset