than JSON [18] and the schema-less binay serialization specifications listed
in Table 7 in the _Tier 2 Minified $\geq$ 100 $<$ 1000 bytes, numeric,
redundant, and nested_ (Tier 2 NRN) GeoJSON [12] document from subsection
6.13. With the exception of ASN.1 PER Unaligned [58] and Cap’n Proto Packed
Encoding [70], the selection of schema-driven binary serialization
specifications result in negative outliers for the Tier 2 NRN case as shown in
Figure 69 (A, B, C, D, E and F). Compared to the other JSON documents from the
input data set, this JSON document consists of highly nested arrays and almost
no object keys. Leaving that exception aside, we found that in general, the
schema-driven binary serialization specifications listed Table 6 provide the
highest space-efficiency improvements in comparison to JSON [18] on _boolean_
documents and tend to provide the least space-efficient improvements on
_textual_ JSON documents. Figure 69 shows that schema-driven binary
serialization specifications, in particular ASN.1 PER Unaligned [58], Apache
Avro [28], Protocol Buffers [32] and Apache Thrift [61], result in high size
reductions in comparison to JSON. However, every considered schema-driven
binary serialization specification results in at least one negative space-
efficiency exception.

Summary. The schema-driven binary serialization specifications listed in Table
6 tend to be more space-efficient than the schema-less binary serialization
specifications listed in Table 7 and JSON [18] in most cases. Based on our
findings, we conclude that ASN.1 PER Unaligned [58] and Apache Avro (unpacked)
[28] are space-efficient in comparison to schema-less binary serialization
specifications in almost all cases as they provide over 70% median size
reductions and over 65% average size reductions in comparison to JSON [18].

Table 65: A summary of the size reduction results in comparison to JSON [18] of the selection of schema-driven binary serialization specifications listed in Table 6 against the input data listed in Table 4 and Table 5. See Figure 69 for a visual representation of this data. Serialization Specification | Size Reductions in Comparison To JSON | Negative Cases
---|---|---
Maximum | Minimum | Range | Median | Average
ASN.1 (PER Unaligned) | 98.5% | -7.9% | 106.4 | 71.4% | 65.7% | 1 / 27 (3.7%)
Apache Avro (unframed) | 100% | -48.9% | 148.9 | 73.5% | 65.7% | 1 / 27 (3.7%)
Microsoft Bond (Compact Binary v1) | 88% | -56.8% | 144.8 | 63.4% | 54% | 1 / 27 (3.7%)
Cap’n Proto | 81.1% | -179.1% | 260.1 | 1.9% | -2.9% | 12 / 27 (44.4%)
Cap’n Proto (packed) | 90.1% | -20% | 110.1 | 55.2% | 49.6% | 1 / 27 (3.7%)
FlatBuffers | 72% | -257.9% | 329.8 | 0.7% | -6.1% | 13 / 27 (48.1%)
Protocol Buffers | 100% | -71.1% | 171.1 | 70.6% | 59.3% | 1 / 27 (3.7%)
Apache Thrift (Compact Protocol) | 97.7% | -45.8% | 143.5 | 67.6% | 58.1% | 1 / 27 (3.7%)
Averages | 90.9% | -85.9% | 176.9 | 50.6% | 42.9% | 14.3%

Figure 69: A box plot that demonstrates the size reduction (in percentages) of
the selection of schema-driven binary serialization specifications listed in
Table 6 in comparison to uncompressed JSON [18] given the input data listed in
Table 4 and Table 5.

###  8.3 Q3: How do JSON-compatible sequential binary serialization
specifications compare to JSON-compatible pointer-based binary serialization
specifications in terms of space-efficiency?

Figure 70: The binary serialization specifications that resulted in the
highest size reductions for each JSON [18] document for the input data listed
in Table 4 and Table 5, broken down by type. Schema-driven sequential binary
serialization specifications, in particular ASN.1 PER Unaligned [58] and
Apache Avro [28], resulted in the highest size reductions in most cases.

In terms of the schema-less binary serialization specifications listed in
Table 7, Table 64 illustrates that in comparison to JSON [18], FlexBuffers
[68] results in negative median and average size reductions, a characteristic
only otherwise applicable to BSON [43]. Leaving BSON aside, FlexBuffers only
results in more space-efficient messages than a strict subset of the
sequential schema-less binary serialization specifications in three cases:
_Tier 1 TRN_ (subsection 6.6), _Tier 2 TRN_ (subsection 6.17) and _Tier 3 TRN_
(subsection 6.24). Furthemore, FlexBuffers [68] is comparatively more space-
efficient that all the other schema-less binary serialization specifications
listed in Table 7 for the _Tier 2 TRF_ JSON document from subsection 6.16 and
the _Tier 3 TRF_ JSON document from subsection 6.23. However, as explained in
subsection 8.1, this is due to FlexBuffers automatic string deduplication
feature, which is orthogonal to whether a binary serialization specification
is sequential or pointer-based.

We refer to the schema-driven binary serialization specifications listed in
Table 6. Table 65 illustrates that the selection of sequential schema-driven
binary serialization specifications are strictly superior to FlatBuffers [67]
in terms of space reductions. Similarly, Cap’n Proto [70] (unpacked) provides
a more space-efficient bit-string than a single sequential schema-driven
binary serialization specification, Microsoft Bond [44] (Compact Binary v1),
in a single case: _Tier 2 BRF_ (subsection 6.20). However, Cap’n Proto [70]
(packed) results in more space-efficient messages than a strict subset of the
sequential schema-driven binary serialization specifications in six cases:
_Tier 1 NNF_ (subsection 6.3), _Tier 1 BRF_ (subsection 6.9), _Tier 2 NRN_
(subsection 6.13), _Tier 2 BRF_ (subsection 6.20), _Tier 3 NRF_ (subsection
6.22), and _Tier 3 BRF_ (subsection 6.27); but never surpasses the entire set
of sequential schema-driven binary serialization specifications for any JSON
document from the input data set listed in Table 4 and Table 5.

Summary. Based on our findings, sequential binary serialization specifications
are typically more space-efficient than pointer-based binary serialization
specifications, independent of whether they are schema-less or schema-driven.

###  8.4 Q4: How does compressed JSON compares to uncompressed and compressed
JSON-compatible binary serialization specifications?

####  8.4.1 Data Compression

We found that data compression tends to yield negative results on _Tier 1
Minified $<$ 100 bytes_ JSON documents. As an extreme, LZMA resulted in a
negative 171.4% size reduction for subsection 6.3. The entire selection of
data compression formats produced negative results for all the _Tier 1
Minified $<$ 100 bytes_ JSON documents we considered except for subsection
6.10, for which LZ4 produced a negative result but GZIP [17] and LZMA resulted
in a 8.2% and 6.1% reduction, respectively, and subsection 6.6, for which all
data compression formats produced positive results ranging from 10.4% in the
case of LZ4 to 16.7% in the case of GZIP [17]. Leaving _Tier 1 Minified $<$
100 bytes_ JSON documents aside, all the data compression formats we selected
offered better average and median compression ratios on _textual_ JSON
documents as seen in Table 66. Out of the selection of data compression
formats, GZIP [17] performed better in terms of the average and median size
reduction in all _Tier 2 Minified $\geq$ 100 $<$ 1000 bytes_ and _Tier 3
Minified $\geq$ 1000 bytes_ categories.

Table 66: The average and median size reduction of using the selection of data compression formats on the _Tier 2 Minified $\geq$ 100 $<$ 1000 bytes_ and _Tier 3 Minified $\geq$ 1000 bytes_ input JSON documents. GZIP [17] resulted in higher compression ratios for all categories. Compression Format | Numeric | Textual | Boolean
---|---|---|---
_Average_ | _Median_ | _Average_ | _Median_ | _Average_ | _Median_
GZIP (compression level 9) | 39% | 33.3% | 54% | 49.2% | 28% | 26.8%
LZ4 (compression level 9) | 21% | 19.5% | 40% | 32.7% | 20% | 8.7%
LZMA (compression level 9) | 38% | 32.8% | 52% | 48% | 25% | 21.3%

####  8.4.2 Schema-less Binary Serialization Specifications

Table 67 summarizes the size reductions provided by schema-less binary
serialization specifications in comparison to compresed JSON [18]. Leaving
BSON [43] and FlexBuffers [68] aside, schema-less binary serialization
specifications typically provide space-efficient results in _Tier 1 Minified
$<$ 100 bytes_ JSON documents, as these usually resulted in negative
compression ratios. However, compressed JSON provides space-efficient results
in 15 out of the 27 listed in Figure 11. In comparison to compressed JSON, no
schema-less binary serialization provides both a positive median and average
size reduction. As shown in Figure 71, the selection of schema-less binary
serialization specifications listed in Table 7, with the exception of
FlexBuffers [68], result in negative outliers for the Tier 2 TRF case from
subsection 6.16 (A, B, C, D, E).

As summarized in Table 68, compressing the bit-strings produced by schema-less
binary serialization specifications results in 22 out 90 instances that are
space-efficient in comparison to compressed JSON on _Tier 2 Minified $\geq$
100 $<$ 1000 bytes_ and _Tier 3 Minified $\geq$ 1000 bytes_ JSON documents but
reduces the advantages that uncompressed schema-less binary serialization
specifications have over compressed JSON on _Tier 1 Minified $<$ 100 bytes_
JSON documents. In comparison to compressed JSON, compressed CBOR [6] is
strictly equal or superior than the rest of the compressed schema-less binary
serialization specifications in all but a single case: _Tier 1 NRN_ from
subsection 6.2, providing the highest median (8.8%) and highest average (8.1%)
size reductions. As a notable outlier shown in Figure 72, best-case compressed
BSON [43] results in a negative size reduction of 44% in comparison to
compressed JSON [18] for the Tier 2 NRN case from subsection 6.13.

Table 67: A summary of the size reduction results in comparison to the best case scenarios of compressed JSON [18] given the compression formats listed in Table 9 of the selection of schema-less binary serialization specifications listed in Table 7 against the input data listed in Table 4 and Table 5. See Figure 71 for a visual representation of this data. Serialization Specification | Size Reductions in Comparison To Compressed JSON | Negative Cases
---|---|---
Maximum | Minimum | Range | Median | Average
BSON | 50.0% | -353.9% | 403.9 | -40.8% | -76.9% | 22 / 27 (81.4%)
CBOR | 69.7% | -307.1% | 376.8 | 7.5% | -26.8% | 13 / 27 (48.1%)
FlexBuffers | 45.5% | -193.5% | 238.9 | -48.1% | -50.8% | 20 / 27 (74%)
MessagePack | 69.7% | -307.1% | 376.8 | 7.5% | -26.2% | 13 / 27 (48.1%)
Smile | 54.5% | -292.2% | 346.8 | -5% | -31.7% | 14 / 27 (51.8%)
UBJSON | 60.6% | -327.3% | 387.9 | -16.3% | -43.6% | 15 / 27 (55.5%)
Averages | 58.3% | -296.9% | 355.2 | -15.9% | -42.7% | 59.8%

Figure 71: A box plot that demonstrates the size reduction (in percentages) of the selection of schema-less binary serialization specifications listed in Table 7 in comparison to the best-case compressed JSON [18] given the compression formats listed in Table 9 and the input data listed in Table 4 and Table 5. Table 68: A summary of the size reduction results of the best case scenarios of compressed schema-less binary serialization specifications listed in Table 7 in comparison to the best case scenarios of compressed JSON [18] given the compression formats listed in Table 9 and the the input data listed in Table 4 and Table 5. See Figure 72 for a visual representation of this data. Serialization Specification | Size Reductions in Comparison To Compressed JSON | Negative Cases
---|---|---
Maximum | Minimum | Range | Median | Average
Compressed BSON | 8% | -44% | 52 | -10.1% | -11% | 23 / 27 (85.1%)
Compressed CBOR | 24.5% | -8.7% | 33.3 | 8.8% | 8.1% | 4 / 27 (14.8%)
Compressed FlexBuffers | 0% | -58.9% | 58.9 | -24.4% | -23.8% | 27 / 27 (100%)
Compressed MessagePack | 24.5% | -13.7% | 38.2 | 7.5% | 5.9% | 10 / 27 (37%)
Compressed Smile | 13.9% | -18.4% | 32.2 | -1.6% | -1.6% | 14 / 27 (51.8%)
Compressed UBJSON | 13.6% | -16.5% | 30.1 | -0.7% | -1.9% | 15 / 27 (55.5%)
Averages | 14.1% | -26.7% | 40.8 | -3.4% | -4.1% | 57.3%

Figure 72: A box plot that demonstrates the size reduction (in percentages) of
the selection of schema-less binary serialization specifications listed in
Table 7 in their best-case compressed forms given the compression formats
listed in Table 9 in comparison to the best-case compressed JSON [18] given
the compression formats listed in Table 9 and the input data listed in Table 4
and Table 5.

####  8.4.3 Schema-driven Binary Serialization Specifications

As shown in Table 69, schema-driven binary serialization specifications
provide positive median and average size reductions in comparison to
compressed JSON [18]. However, schema-driven binary serialization
specifications tend to produce negative results in comparison to compressed
JSON mostly on _Tier 2 Minified $\geq$ 100 $<$ 1000 bytes_ _textual_ (22 out
of 32 cases) and _Tier 3 Minified $\geq$ 1000 bytes_ _textual_ (25 out of 32)
JSON documents. Even when taking compression into account, both ASN.1 PER
Unaligned [58] and Apache Avro (unpacked) [28] continue to provide over 70%
median size reductions and almost 40% average size reductions. As shown in
Figure 73, the entire selection of schema-driven binary serialization
specifications listed in Table 6 results in negative outliers for the Tier 2
TRF case from subsection 6.16 (A, B, C, D, E, G and H) and the Tier 2 NRN case
from subsection 6.13 (F).

Compressing the bit-strings produced by schema-driven binary serialization
specifications shows that compressed _sequential_ schema-driven binary
serialization specifications are strictly superior than compressed JSON [18]
as shown in Table 70. On the higher end, both ASN.1 PER Unaligned [58] and
Apache Avro [28] provide median and average size reductions of over 50% in
comparison to compressed JSON, with a minimum size reduction of over 11% in
the Tier 2 NRN case from subsection 6.13 for which all the schema-driven
binary serialization specifications previously resulted in negative size
reductions in comparison to uncompressed JSON. As a notable exception shown in
Figure 74, best-case compressed FlatBuffers [67] results in a negative size
reduction of 68.1% (A) in comparison to compressed JSON [18] for the Tier 2
NRN case.

Table 69: A summary of the size reduction results in comparison to the best case scenarios of compressed JSON [18] given the compression formats listed in Table 9 of the selection of schema-diven binary serialization specifications listed in Table 6 against the input data listed in Table 4 and Table 5. See Figure 73 for a visual representation of this data. Serialization Specification | Size Reductions in Comparison To Compressed JSON | Negative Cases
---|---|---
Maximum | Minimum | Range | Median | Average
ASN.1 (PER Unaligned) | 98.5% | -222.7% | 321.3 | 75.5% | 39% | 6 / 27 (22.2%)
Apache Avro (unframed) | 100% | -227.3% | 327.3 | 72.7% | 39.4% | 5 / 27 (18.5%)
Microsoft Bond (Compact Binary v1) | 93.2% | -239% | 332.1 | 60.2% | 23.4% | 6 / 27 (22.2%)
Cap’n Proto | 70.1% | -315.6% | 385.7 | -9.1% | -45.7% | 15 / 27 (55.5%)
Cap’n Proto (packed) | 86.4% | -267.5% | 353.9 | 50% | 17% | 8 / 27 (29.6%)
FlatBuffers | 54.5% | -486.2% | 540.8 | -23.4% | -55.4% | 17 / 27 (62.9%)
Protocol Buffers | 100% | -238.3% | 338.3 | 67% | 28.4% | 6 / 27 (22.2%)
Apache Thrift (Compact Protocol) | 98% | -238.3% | 336.3 | 69.3% | 29% | 6 / 27 (22.2%)
Averages | 87.6% | -279.4% | 367 | 45.3% | 9.4% | 31.9%

Figure 73: A box plot that demonstrates the size reduction (in percentages) of the selection of schema-driven binary serialization specifications listed in Table 6 in comparison to the best-case compressed JSON [18] given the compression formats listed in Table 9 and the input data listed in Table 4 and Table 5. Table 70: A summary of the size reduction results of the best case scenarios of compressed schema-driven binary serialization specifications listed in Table 6 in comparison to the best case scenarios of compressed JSON [18] given the compression formats listed in Table 9 and the the input data listed in Table 4 and Table 5. See Figure 74 for a visual representation of this data. Serialization Specification | Size Reductions in Comparison To Compressed JSON | Negative Cases
---|---|---
Maximum | Minimum | Range | Median | Average
Compressed ASN.1 (PER Unaligned) | 83.8% | 11.2% | 72.6 | 54.5% | 51.2% | 0 / 27 (0%)
Compressed Apache Avro (unframed) | 84% | 16.7% | 67.3 | 52.2% | 52.3% | 0 / 27 (0%)
Compressed Microsoft Bond (Compact Binary v1) | 66.3% | 8.6% | 57.6 | 42% | 40.3% | 0 / 27 (0%)
Compressed Cap’n Proto | 75.7% | -13.8% | 89.4 | 22.1% | 28% | 3 / 27 (11.1%)
Compressed Cap’n Proto (packed) | 77.2% | -18.1% | 95.3 | 30.2% | 32.7% | 3 / 27 (11.1%)
Compressed FlatBuffers | 60.4% | -68.1% | 128.5 | 10.2% | 12.1% | 9 / 27 (33.3%)
Compressed Protocol Buffers | 80.3% | 7.8% | 72.5 | 46.4% | 44.6% | 0 / 27 (0%)
Compressed Apache Thrift (Compact Protocol) | 78.1% | 10.3% | 67.8 | 48.9% | 46.2% | 0 / 27 (0%)
Averages | 75.7% | -5.7% | 81.4 | 38.3% | 38.4% | 6.9%

Figure 74: A box plot that demonstrates the size reduction (in percentages) of
the selection of schema-driven binary serialization specifications listed in
Table 6 in their best-case compressed forms given the compression formats
listed in Table 9 in comparison to the best-case compressed JSON [18] given
the compression formats listed in Table 9 and the input data listed in Table 4
and Table 5.

Summary. In comparison to compressed JSON, both compressed and uncompressed
schema-less binary serialization specifications result in negative median and
average size reductions. However, both compressed and uncompressed schema-
driven binary serialization specifications result in positive median and
average reduction. Furthermore, compressed sequential schema-driven binary
serialization specifications are strictly superior to compressed JSON in all
the cases from the input data.

###  8.5 JSON Compatibility

Implementing the benchmark and writing schemas for the set of schema-driven
serialization specification revealed that some of the considered schema-driven
serialization specifications are not strictly compatible with JSON [18] and
required transformations in order for the input data to be accepted by the
implementations or the respective schema definition languages when encoding
JSON documents from the input data set listed in Table 4 and Table 5. These
transformations can be inspected in the benchmark public GitHub repository
123123123https://github.com/jviotti/binary-json-size-benchmark. These
transformations are divided into the following categories:

  * •

Keys. The schema definition languages provided by ASN.1 [57], Microsoft Bond
[44], Cap’n Proto [70], FlatBuffers [67], Protocol Buffers [32], and Apache
Thrift [61] disallow property names that include hyphens, slashes, dollar
signs, parenthesis, and periods. Also, ASN.1 [57] disallows property names
that start with an underscore and Cap’n Proto [70] disallows property names
include underscores and capitalised property names. Furthermore, Protocol
Buffers [32] and Apache Thrift [61] disallow property names that equal the
reserved keywords _async_ , _extends_ , _in_ , and _with_. To handle these
cases, the disallowed properties are renamed to a close variation that the
schema language permits.

  * •

Values. Protocol Buffers [32] defines the _null_ type as an enumeration
consisting of a single constant: zero
124124124https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/struct.proto.
FlatBuffers [67] does not support a _null_ type. When using FlatBuffers [67],
we represent this type with an enumeration consisting of a single constant in
the same manner as Protocol Buffers [32]. In both cases, we transform any JSON
[18] _null_ value into zero.

  * •

Structural. Neither Microsoft Bond [44], Cap’n Proto [70], FlatBuffers [67],
Protocol Buffers [32], nor Apache Thrift [61] support encoding a JSON document
that consists of a top level array. In these cases, we move the array into a
wrapper structure. FlatBuffers [67] and Protocol Buffers [32] also do not
support nested arrays. In these cases, we introduce wrapper structures at
every array nesting level. Finally, ASN.1 [57], Microsoft Bond [44], Cap’n
Proto [70], FlatBuffers [67], Protocol Buffers [32], and Apache Thrift [61] do
not support heterogenous arrays of non-composite types. In these cases, we
convert the heterogenous arrays into arrays of union structures. Microsoft
Bond [44] does not support union types and in this case we introduce a
structure consisting of optional fields. Additionally, the use of unions in
FlatBuffers [67] requires the introduction of an additional textual property
to signify the union choice. In order not to put this specification at a
disadvantage, we encode the fixed-length heterogenous array as tables where
their property names correspond to the array indexes.

The type of transformations that were necessary for each JSON document from
the input data defined in Table 4 and Table 5 are listed in Table 71. In
summary, every schema-less binary serialization specifications listed in Table
7 is compatible with the input data set. In terms of schema-driven
specifications, only Apache Avro [28] is strictly compatible with the input
data set.

Table 71: A summary of the transformations needed to serialize the input data JSON documents listed in Table 4 and Table 5 using the set of binary serialization specifications listed in Table 6 and Table 7. The JSON documents from Table 4 and Table 5 that are not present in this table did not require any type of transformation. Each letter signifies the type of required transformation as defined in this section. The letter K stands for _Keys_ , the letter V stands for _Values_ , and the letter S stands for _Structural_. Input Data |  ASN.1 |  Apache Avro |  Microsoft Bond |  BSON |  Cap’n Proto |  CBOR |  FlatBuffers |  FlexBuffers |  MessagePack |  Protocol Buffers |  Smile |  Apache Thrift |  UBJSON
---|---|---|---|---|---|---|---|---|---|---|---|---|---
Tier 1 NRF | K |  | K |  | K |  | K |  |  | K |  | K |
Tier 1 NRN | K |  | K |  | K |  | K |  |  | K |  | K |
Tier 1 TRF | K |  | K |  | K |  | K |  |  | K |  | K |
Tier 1 TRN | K+S |  | K+S |  | K+S |  | K+S |  |  | K+S |  | K+S |
Tier 1 TNF |  |  |  |  |  |  |  |  |  | K |  | K |
Tier 1 BRF |  |  |  |  |  |  | V |  |  | V |  |  |
Tier 1 BRN | K |  | K |  | K |  | K |  |  | K |  | K |
Tier 1 BNN | K |  | K |  | K |  | K |  |  | K |  | K |
Tier 2 NRN |  |  |  |  |  |  | S |  |  | S |  |  |
Tier 2 NNF |  |  |  |  | K |  |  |  |  |  |  |  |
Tier 2 NNN |  |  | S |  | K+S |  | S |  |  | S |  | S |
Tier 2 TNF |  |  |  |  | K |  |  |  |  |  |  |  |
Tier 2 TNN | K |  | K |  | K |  | K |  |  | K |  | K |
Tier 2 BRF |  |  |  |  | K |  | V |  |  | V |  |  |
Tier 3 NRF | K+S |  | K+S |  | K+S |  | K+S |  |  | K+S |  | K+S |
Tier 3 TRF | K+S |  | K+S |  | K+S |  | K+S |  |  | K+S |  | K+S |
Tier 3 TRN | K |  | K |  | K |  | K |  |  | K |  | K |
Tier 3 BRF |  |  |  |  | K |  | V |  |  | V |  |  |
Tier 3 TNF | K |  | K |  | K |  | K |  |  | K |  | K |

##  9 Future Work

In this paper, we present the results of a comprehensive benchmark of 13 JSON-
compatible schema-driven and schema-less binary serialization specifications
across 27 real-world JSON documents test cases across industries.

Our findings provide a number of conclusions. When we investigated how JSON-
compatible schema-less binary serialization specifications compare to JSON in
terms of space-efficiency, we found that using MessagePack [30] on _Tier 1
Minified $<$ 100 bytes_ and _Tier 2 Minified $\geq$ 100 $<$ 1000 bytes_ JSON
documents, Smile [56] on _Tier 3 Minified $\geq$ 1000 bytes_ JSON documents,
and FlexBuffers [68] on JSON documents with high-redundancy of _textual_
values increases space-efficiency. When we investigated how JSON-compatible
schema-driven binary serialization specifications compare to JSON and JSON-
compatible schema-less binary serialization specifications in terms of space-
efficiency, we found that ASN.1 PER Unaligned [58] and Apache Avro (unpacked)
[28] are space-efficient in comparison to schema-less binary serialization
specifications in almost all cases. When we investigated how JSON-compatible
sequential binary serialization specifications to compare to JSON-compatible
pointer-based binary serialization specifications in terms of space-
efficiency, we found that sequential binary serialization specifications are
typically more space-efficient than pointer-based binary serialization
specifications, independent of whether they are schema-less or schema-driven.
When we investigated how compressed JSON compares to uncompressed and
compressed JSON-compatible binary serialization specifications, we found that
in comparison to compressed JSON, both compressed and uncompressed schema-less
binary serialization specifications result in negative median and average size
reductions. However, both compressed and uncompressed schema-driven binary
serialization specifications result in positive median and average reduction.
Furthermore, compressed sequential schema-driven binary serialization
specifications are strictly superior to compressed JSON in all the cases from
the input data.

Based on our findings, we believe there is room to augment the input data set
to include JSON documents that match the 9 missing taxonomy categories
described in subsection 5.1 and to increase the sample proportionality. We
hope to encourage contributions to our open-source space-efficiency benchmark
automation software for general improvements and support for new JSON-
compatible binary serialization specifications. Using our learnings, we hope
to propose a new JSON-compatible binary serialization specification with
better space-efficiency characteristics.

## Acknowledgments and Disclosure of Funding

Thanks to OSS Nokalva 125125125https://www.ossnokalva.com for offering access
to and help for using their proprietary ASN-1Step ASN.1 [57] implementation.

## References

  * [1]
  * rss [2003] Berkman Center for Internet & Society at Harvard Law School 2003\.  _RSS 2.0 Specification_.  Berkman Center for Internet & Society at Harvard Law School.  https://www.rssboard.org/rss-2-0-1
  * Baazizi et al. [2019] Mohamed-Amine Baazizi, Dario Colazzo, Giorgio Ghelli, and Carlo Sartiani. 2019.  Parametric schema inference for massive JSON datasets.  _The VLDB Journal_ 28, 4 (2019), 497–521.
  * Bartík et al. [2015] Matěj Bartík, Sven Ubik, and Pavel Kubalik. 2015\.  LZ4 compression algorithm on FPGA. In _2015 IEEE International Conference on Electronics, Circuits, and Systems (ICECS)_. 179–182.  https://doi.org/10.1109/ICECS.2015.7440278
  * Biswal and Almallah [2019] Amrit Kumar Biswal and Obada Almallah. 2019.  _Analytical Assessment of Binary Data Serialization Techniques in IoT Context_.  Master’s thesis. Dipartimento di Elettronica, Informazione e Bioingegneria.
  * Bormann and Hoffman [2013] C. Bormann and P. Hoffman. 2013.  _Concise Binary Object Representation (CBOR)_.  RFC. IETF.  https://doi.org/10.17487/RFC7049
  * Bourhis et al. [2017] Pierre Bourhis, Juan L. Reutter, Fernando Suárez, and Domagoj Vrgoč. 2017.  JSON: Data Model, Query Languages and Schema Specification. In _Proceedings of the 36th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems_ (Chicago, Illinois, USA) _(PODS ’17)_. Association for Computing Machinery, New York, NY, USA, 123–135.  https://doi.org/10.1145/3034786.3056120
  * Braeger [2016] Steven Braeger. 2016\.  _Universal Binary JSON Specification_.  UBJSON.  https://ubjson.org
  * Bray [2014] T. Bray. 2014.  _The JavaScript Object Notation (JSON) Data Interchange Format_.  RFC. IETF.  https://doi.org/10.17487/RFC8259
  * Bryan [2013a] P. Bryan. 2013a.  _JavaScript Object Notation (JSON) Patch_.  RFC. IETF.  https://doi.org/10.17487/RFC6902
  * Bryan [2013b] P. Bryan. 2013b.  _JavaScript Object Notation (JSON) Pointer_.  RFC.  https://doi.org/10.17487/RFC6901
  * Butler et al. [2016] H. Butler, M. Daly, A. Doyle, S. Gillies, S. Hagen, and T. Schaub. 2016.  _The GeoJSON Format_.  RFC. IETF.  https://doi.org/10.17487/RFC7946
  * Cánovas Izquierdo and Cabot [2013] Javier Luis Cánovas Izquierdo and Jordi Cabot. 2013.  Discovering Implicit Schemas in JSON Data. In _Web Engineering_ , Florian Daniel, Peter Dolog, and Qing Li (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 68–83.
  * Collet and Kucherawy [2021] Yann Collet and Murray Kucherawy. 2021.  _Zstandard Compression and the ’application/zstd’ Media Type_.  RFC. IETF.  https://doi.org/10.17487/RFC8878
  * Consortium [2019] The Unicode Consortium. 2019\.  _The Unicode Standard, Version 12.1.0_.  Standard. The Unicode Consortium, Mountain View, CA.
  * Cánovas Izquierdo and Cabot [2016] Javier Luis Cánovas Izquierdo and Jordi Cabot. 2016.  JSONDiscoverer: Visualizing the schema lurking behind JSON documents.  _Knowledge-Based Systems_ 103 (2016), 52–55.  https://doi.org/10.1016/j.knosys.2016.03.020
  * Deutsch [1996] P. Deutsch. 1996\.  _GZIP file format specification version 4.3_.  RFC.  https://doi.org/10.17487/RFC1952
  * ECMA [2017] ECMA. 2017.  _ECMA-404: The JSON Data Interchange Syntax_.  ECMA, Geneva, CH.  https://www.ecma-international.org/publications/standards/Ecma-404.htm
  * ECMA [2021] ECMA. 2021.  _ECMA-262: ECMAScript 2021 language specification_.  ECMA, Geneva, CH.  https://www.ecma-international.org/publications/standards/Ecma-262.htm
  * Ed-douibi et al. [2017] Hamza Ed-douibi, Javier Luis Cánovas Izquierdo, and Jordi Cabot. 2017.  Example-Driven Web API Specification Discovery. In _Modelling Foundations and Applications_ , Anthony Anjorin and Huáscar Espinoza (Eds.). Springer International Publishing, Cham, 267–284.
  * F. Galiegue [[n.d.]] G. Court F. Galiegue, K. Zyp. [n.d.].  _JSON Schema: core definitions and terminology_.  IETF.  https://tools.ietf.org/html/draft-zyp-json-schema-04
  * Faulkner et al. [2021] Steve Faulkner, Arron Eicholz, Travis Leithead, Alex Danilo, and Sangwhan Moon. 2021.  _HTML 5.2_.  W3C Recommendation. W3C.  https://www.w3.org/TR/html52/.
  * Feng and Li [2013] Jianhua Feng and Jinhong Li. 2013.  Google protocol buffers research and application in online game. In _IEEE Conference Anthology_. IEEE, China, 4.
  * Ferragina and Manzini [2010] Paolo Ferragina and Giovanni Manzini. 2010.  On Compressing the Textual Web. In _Proceedings of the Third ACM International Conference on Web Search and Data Mining_ (New York, New York, USA) _(WSDM ’10)_. Association for Computing Machinery, New York, NY, USA, 391–400.  https://doi.org/10.1145/1718487.1718536
  * Fielding et al. [1999] R. Fielding, J. Gettys, J. Mogul, H. Frystyk, L. Masinter, P. Leach, and T. Berners-Lee. 1999.  _Hypertext Transfer Protocol – HTTP/1.1_.  RFC.  https://doi.org/10.17487/RFC2616
  * Fielding and Reschke [2014] R. Fielding and J. Reschke. 2014.  _Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content_.  RFC.  https://doi.org/10.17487/RFC7231
  * for Floating-Point Arithmetic [2019] Working Group for Floating-Point Arithmetic. 2019.  IEEE Standard for Floating-Point Arithmetic.  _IEEE Std 754-2019 (Revision of IEEE 754-2008)_ 1, 1 (2019), 1–84.
  * Foundation [2012] The Apache Software Foundation. 2012\.  _Apache Avro™ 1.10.0 Specification_.  The Apache Software Foundation.  https://avro.apache.org/docs/current/spec.html
  * Frozza et al. [2018] A. A. Frozza, R. d. S. Mello, and F. d. S. d. Costa. 2018\.  An Approach for Schema Extraction of JSON and Extended JSON Document Collections. In _2018 IEEE International Conference on Information Reuse and Integration (IRI)_. IEEE, Salt Lake City, Utah, 356–363.
  * Furuhashi et al. [2013] Sadayuki Furuhashi, Satoshi Tagomori, Yuichi Tanikawa, Stephen Colebourne, Stefan Friesel, René Kijewski, Michael Cooper, Uenishi Kota, and Gabe Appleton. 2013\.  _MessagePack Specification_.  MessagePack.  https://github.com/msgpack/msgpack/blob/master/spec.md
  * Gil and Trezentos [2011] Bruno Gil and Paulo Trezentos. 2011.  Impacts of Data Interchange Formats on Energy Consumption and Performance in Smartphones. In _Proceedings of the 2011 Workshop on Open Source and Design of Communication_ (Lisboa, Portugal) _(OSDOC ’11)_. Association for Computing Machinery, New York, NY, USA, 1–6.  https://doi.org/10.1145/2016716.2016718
  * Google [2020] Google. 2020.  _Protocol Buffers Version 3 Language Specification_.  Google.  https://developers.google.com/protocol-buffers/docs/reference/proto3-spec
  * Hamerski et al. [2018] Jean Carlo Hamerski, Anderson RP Domingues, Fernando G Moraes, and Alexandre Amory. 2018.  Evaluating serialization for a publish-subscribe based middleware for MPSoCs. In _2018 25th IEEE International Conference on Electronics, Circuits and Systems (ICECS)_. IEEE, IEEE, Bordeaux, 773–776.
  * Harrison et al. [2021] Sam Harrison, Abhishek Dasgupta, Simon Waldman, Alex Henderson, and Christopher Lovell. 2021.  How reproducible should research software be?  https://doi.org/10.5281/zenodo.4761867
  * Huffman [1952] David A Huffman. 1952\.  A method for the construction of minimum-redundancy codes.  _Proceedings of the IRE_ 40, 9 (1952), 1098–1101.
  * ISO/IEC JTC 1/SC 22 Programming languages and system software interfaces [2002] their environments ISO/IEC JTC 1/SC 22 Programming languages and system software interfaces. 2002\.  _Z formal specification notation — Syntax, type system and semantics_.  Standard. International Organization for Standardization.
  * Jahed and Dingel [2019] K. Jahed and J. Dingel. 2019.  Enabling Model-Driven Software Development Tools for the Internet of Things. In _2019 IEEE/ACM 11th International Workshop on Modelling in Software Engineering (MiSE)_. IEEE, Montreal, QC, Canada, 93–99.  https://doi.org/10.1109/MiSE.2019.00022
  * Jayasankar et al. [2021] Uthayakumar Jayasankar, Vengattaraman Thirumal, and Dhavachelvan Ponnurangam. 2021.  A survey on data compression techniques: From the perspective of data quality, coding schemes, data type and applications.  _Journal of King Saud University - Computer and Information Sciences_ 33, 2 (2021), 119–140.  https://doi.org/10.1016/j.jksuci.2018.05.006
  * Klettke et al. [2015] Meike Klettke, Uta Störl, and Stefanie Scherzinger. 2015\.  Schema extraction and structural outlier detection for JSON-based nosql data stores. In _Datenbanksysteme für Business, Technologie und Web (BTW 2015)_ , Thomas Seidl, Norbert Ritter, Harald Schöning, Kai-Uwe Sattler, Theo Härder, Steffen Friedrich, and Wolfram Wingerath (Eds.). Gesellschaft für Informatik e.V., Bonn, 425–444.
  * Krashinsky [2003] Ronny Krashinsky. 2003\.  Efficient web browsing for mobile clients using HTTP compression.  _See: http://www. cag. lcs. mit. edu/~ ronny/classes/httpcomp. pdf_ (2003).
  * Kyurkchiev [2015] Pavel Kyurkchiev. 2015\.  Integrating a System for Symbol Programming of Real Processes with a Cloud Service.  , 8 pages.
  * Maeda [2012] K Maeda. 2012.  Performance evaluation of object serialization libraries in XML, JSON and binary formats.  , 177–182 pages.
  * Merriman et al. [2020] Dwight Merriman, Stephen Steneker, Hannes Magnusson, Luke Lovett, Kevin Albertson, Kay Kim, and Allison Reinheimer Moore. 2020.  _BSON Specification Version 1.1_.  MongoDB.  http://bsonspec.org/spec.html
  * Microsoft [2018] Microsoft. 2018\.  _Bond Compiler 0.12.0.1_.  Microsoft.  https://microsoft.github.io/bond/manual/compiler.html
  * Nottingham and Sayre [2005] M. Nottingham and R. Sayre. 2005.  _The Atom Syndication Format_.  RFC. IETF.  https://doi.org/10.17487/RFC4287
  * Parekar and Thakare [2014] PM Parekar and SS Thakare. 2014.  Lossless data compression algorithm–a review.  _International Journal of Computer Science & Information Technologies_ 5, 1 (2014).
  * Peng [2011] Roger D Peng. 2011\.  Reproducible research in computational science.  _Science_ 334, 6060 (2011), 1226–1227.
  * Petersen et al. [2017] Bo Petersen, Henrik Bindner, Shi You, and Bjarne Poulsen. 2017\.  Smart grid serialization comparison: Comparision of serialization for distributed control in the context of the internet of things. In _2017 Computing Conference_. IEEE, IEEE, London, UK, 1339–1346.
  * Popić et al. [2016] S. Popić, D. Pezer, B. Mrazovac, and N. Teslić. 2016\.  Performance evaluation of using Protocol Buffers in the Internet of Things communication. In _2016 International Conference on Smart Systems and Technologies (SST)_. International Conference on Smart Systems and Technologies, Osijek, HR, 261–265.
  * Pradana et al. [2019] M. A. Pradana, A. Rakhmatsyah, and A. A. Wardana. 2019\.  Flatbuffers Implementation on MQTT Publish/Subscribe Communication as Data Delivery Format. In _2019 6th International Conference on Electrical Engineering, Computer Science and Informatics (EECSI)_. IEEE, Bandung, Indonesia, 142–146.  https://doi.org/10.23919/EECSI48112.2019.8977050
  * Proos and Carlsson [2020] D. P. Proos and N. Carlsson. 2020.  Performance Comparison of Messaging Protocols and Serialization Formats for Digital Twins in IoV. In _2020 IFIP Networking Conference (Networking)_. IEEE, Paris, France, 10–18.
  * Putnam [1957] Hilary Putnam. 1957\.  Three-valued logic.  _Philosophical Studies_ 8, 5 (1957), 73–80.
  * Ross and West [2016] David Ross and Mike West. 2016.  _Entry Point Regulation_.  W3C Working Group Note. W3C.  https://w3c.github.io/webappsec-epr/.
  * Sahlmann et al. [2018] Kristina Sahlmann, Alexander Lindemann, and Bettina Schnor. 2018.  Binary Representation of Device Descriptions: CBOR versus RDF HDT.  _Technische Universität Braunschw: Braunschweig, Germany_ 0, 0 (2018), 4.
  * Sakamoto et al. [2015] Y. Sakamoto, S. Matsumoto, S. Tokunaga, S. Saiki, and M. Nakamura. 2015.  Empirical study on effects of script minification and HTTP compression for traffic reduction. In _2015 Third International Conference on Digital Information, Networking, and Wireless Communications (DINWC)_. 127–132.  https://doi.org/10.1109/DINWC.2015.7054230
  * Saloranta [2017] Tatu Saloranta. 2017\.  _Efficient JSON-compatible binary format: "Smile"_.  FasterXML.  https://github.com/FasterXML/smile-format-specification/blob/master/smile-specification.md
  * Sector [2015a] ITU Telecommunication Standardization Sector. 2015a.  _Abstract Syntax Notation One (ASN.1): Specification of basic notation_.  Standard. ITU Telecommunication Standardization Sector.
  * Sector [2015b] ITU Telecommunication Standardization Sector. 2015b.  _ASN.1 encoding rules: Specification of Packed Encoding Rules (PER)_.  Standard. ITU Telecommunication Standardization Sector.
  * Silva de Moura et al. [2000] Edleno Silva de Moura, Gonzalo Navarro, Nivio Ziviani, and Ricardo Baeza-Yates. 2000.  Fast and Flexible Word Searching on Compressed Text.  _ACM Trans. Inf. Syst._ 18, 2 (April 2000), 113–139.  https://doi.org/10.1145/348751.348754
  * Simmons and Reece [2017] Brent Simmons and Manton Reece. 2017.  _JSON Feed Version 1_.  https://jsonfeed.org/version/1
  * Slee et al. [2007] Mark Slee, Aditya Agarwal, and Marc Kwiatkowski. 2007\.  Thrift: Scalable cross-language services implementation.  _Facebook White Paper_ 5 (2007), 8.
  * Stewart and Burns [2020] Simon Stewart and David Burns. 2020.  _WebDriver_.  W3C Working Draft. W3C.
  * Storer and Szymanski [1982] James A. Storer and Thomas G. Szymanski. 1982.  Data Compression via Textual Substitution.  _J. ACM_ 29, 4 (Oct. 1982), 928–951.  https://doi.org/10.1145/322344.322346
  * Sumaray and Makki [2012] Audie Sumaray and S Makki. 2012.  A comparison of data serialization formats for optimal efficiency on a mobile platform.  , 6 pages.
  * Svoboda [2020] Pavel Contoˇsˇand Martin Svoboda. 2020\.  JSON Schema Inference Approaches. In _Advances in Conceptual Modeling: ER 2020 Workshops CMAI, CMLS, CMOMM4FAIR, CoMoNoS, EmpER, Vienna, Austria, November 3–6, 2020, Proceedings_. Springer Nature, Springer, Vienna, Austria, 173.
  * van Liempt [2020] Jordi van Liempt. 2020\.  _CityJSON: does (file) size matter?_ Master’s thesis. Department of Urbanism, Faculty of the Built Environment & Architecture.
  * van Oortmerssen [2014] Wouter van Oortmerssen. 2014\.  _FlatBuffers: Writing a Schema_.  Google.  https://google.github.io/flatbuffers/flatbuffers_guide_writing_schema.html
  * van Oortmerssen [2017] Wouter van Oortmerssen. 2017\.  _FlexBuffers_.  Google.  https://google.github.io/flatbuffers/flexbuffers.html
  * Vanura and Kriz [2018] J. Vanura and P. Kriz. 2018\.  Perfomance evaluation of Java, JavaScript and PHP serialization libraries for XML, JSON and binary formats.  , 166–175 pages.
  * Varda [2013] Kenton Varda. 2013\.  _Cap’n Proto Schema Language_.  Sandstorm.  https://capnproto.org/language.html
  * Viotti [2022] Juan Cruz Viotti. 2022\.  _jviotti/binary-json-size-benchmark:_.  https://doi.org/10.5281/zenodo.5829569
  * Viotti and Kinderkhedia [2022] Juan Cruz Viotti and Mital Kinderkhedia. 2022.  A Survey of JSON-compatible Binary Serialization Specifications.  arXiv:2201.02089 [cs.DB]
  * Wibowo [2011] Canggih Wibowo. 2011\.  Evaluation of Protocol Buffers as Data Serialization Format for Microblogging Communication.
  * Wischenbart et al. [2012] Martin Wischenbart, Stefan Mitsch, Elisabeth Kapsammer, Angelika Kusel, Birgit Pröll, Werner Retschitzegger, Wieland Schwinger, Johannes Schönböck, Manuel Wimmer, and Stephan Lechner. 2012\.  User Profile Integration Made Easy: Model-Driven Extraction and Transformation of Social Network Schemas. In _Proceedings of the 21st International Conference on World Wide Web_ (Lyon, France) _(WWW ’12 Companion)_. Association for Computing Machinery, New York, NY, USA, 939–948.  https://doi.org/10.1145/2187980.2188227
  * Wright et al. [2019] A. Wright, H. Andrews, and B. Hutton. 2019.  _JSON Schema: A Media Type for Describing JSON Documents_.  Technical Report. IETF.  https://tools.ietf.org/html/draft-handrews-json-schema-02
  * Wright et al. [2020] A. Wright, H. Andrews, and B. Hutton. 2020.  _JSON Schema: A Media Type for Describing JSON Documents_.  Technical Report. IETF.  https://tools.ietf.org/html/draft-bhutton-json-schema-00
  * Ziv and Lempel [1977] J. Ziv and A. Lempel. 1977\.  A universal algorithm for sequential data compression.  _IEEE Transactions on Information Theory_ 23, 3 (1977), 337–343.  https://doi.org/10.1109/TIT.1977.1055714