Skip to main content
QUICK REVIEW

[Paper Review] Benchmarking JSON BinPack

Juan Cruz Viotti, Mital Kinderkhedia|arXiv (Cornell University)|Nov 23, 2022
Software Engineering ResearchComputer Science7 citations
TL;DR

This paper benchmarks a pre-production implementation of JSON BinPack, a novel schema-driven and schema-less binary serialization format based on JSON Schema, demonstrating it achieves median and average size reductions of 86.7% and 78.7% over JSON in schema-driven mode, and 30.6% and 30.5% in schema-less mode. It outperforms both standard binary formats and best-case compressed JSON in space efficiency.

ABSTRACT

In this paper, we present benchmark results for a pre-production implementation of a novel serialization specification: JSON BinPack. JSON BinPack is a schema-driven and schema-less sequential binary serialization specification based on JSON Schema. It is rich in diverse encodings, and is developed to improve network performance and reduce the operational costs of Internet-based software systems. We present benchmark results for 27 JSON documents and for each plot, we show the schema-driven and schema-less serialization specifications that produce the smallest bit-strings. Through extensive plots and statistical comparisons, we show that JSON BinPack in schema-driven mode is as space-efficient or more space-efficient than every other serialization specification for the 27 documents under consideration. In comparison to JSON, JSON BinPack in schema-driven mode provides a median and average size reductions of 86.7% and 78.7%, respectively. We also show that the schema-less mode of the JSON BinPack binary serialization specification is as space-efficient or more space-efficient than every other schema-less serialization specification for the 27 documents under consideration. In comparison to JSON, JSON BinPack in schema-less mode provides a median and average size reductions of 30.6% and 30.5%, respectively. Unlike other considered schema-driven binary serialization specifications, JSON BinPack in schema-driven mode is space-efficient in comparison to best-case compressed JSON in terms of the median and average with size reductions of 76.1% and 66.8%, respectively. We have made our benchmark results available at jviotti/binary-json-size-benchmark on GitHub.

Motivation & Objective

  • To evaluate the space-efficiency of JSON BinPack, a new binary serialization format for JSON, in comparison to existing schema-driven and schema-less formats.
  • To assess whether JSON BinPack can achieve superior compression over both raw binary formats and compressed JSON across diverse real-world JSON documents.
  • To determine if schema-driven binary serialization can outperform general-purpose data compression, challenging assumptions about textual format compression.
  • To provide a reproducible benchmark for future development and production adoption of JSON BinPack.

Proposed method

  • The benchmark evaluates 27 real-world JSON documents using a pre-production TypeScript implementation of JSON BinPack in both schema-driven and schema-less modes.
  • For each document, the smallest bit-string output from schema-driven and schema-less JSON BinPack is selected and compared against 13 established binary serialization formats and compressed JSON.
  • The comparison includes statistical analysis across median, average, and range of size reductions, with results stratified by document size and content type.
  • The benchmark uses standardized compression formats (e.g., gzip, zstd) for best-case compressed JSON, ensuring fair comparison.
  • The study leverages JSON Schema for schema-driven encoding, with fallback to schema-less mode for unsupported keywords.
  • All benchmark results and code are published on GitHub for reproducibility.

Experimental results

Research questions

  • RQ1How does JSON BinPack in schema-driven mode compare to other schema-driven binary serialization formats in terms of space efficiency?
  • RQ2How does JSON BinPack in schema-less mode compare to other schema-less binary serialization formats in terms of space efficiency?
  • RQ3Can JSON BinPack in schema-driven mode outperform best-case compressed JSON in terms of size reduction?
  • RQ4In which document types or sizes does JSON BinPack show the most significant compression gains?

Key findings

  • In schema-driven mode, JSON BinPack achieves a median size reduction of 86.7% and an average reduction of 78.7% compared to JSON.
  • In schema-less mode, JSON BinPack achieves a median size reduction of 30.6% and an average reduction of 30.5% compared to JSON.
  • JSON BinPack in schema-driven mode outperforms best-case compressed JSON, with median and average size reductions of 76.1% and 66.8%, respectively.
  • Among schema-less formats, JSON BinPack matches or exceeds all alternatives in 27 out of 27 documents, though best-case compressed JSON outperforms it in 13 cases, primarily among small, textual documents.
  • The schema-driven mode of JSON BinPack is more space-efficient than all other schema-driven binary formats evaluated, including Protocol Buffers and Cap’n Proto.
  • The study confirms that a well-designed schema-driven binary format can outperform general-purpose compression on JSON, challenging prior assumptions about the superiority of compressed text-based formats.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.