Boost logo

Boost :

From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2020-09-21 18:46:13

I've gotten some great feedback on this library, thanks to everyone who
spent the time to look at this work and comment on it. We have a little
under three days, and I wanted to address something that is obviously
important as it has been brought up a few times here and elsewhere.

It seems there are two desired use-cases for JSON:

1. "JSON-DOM" - parse and serialize to and from a variant-like hierarchical
container provided by the library

2. "JSON Serialization" - parse and serialize directly to and from
user-defined types.

My thoughts on this are as follows:

* Both of these use-cases are useful, and desirable
* Most of the time, a user wants one or the other - rarely both
* Optimized implementations of these use-cases are unlikely to share much
* These are really two different libraries

Boost.JSON is designed to offer 1. above and has no opinion on 2.

Some of the less-than-positive reviews argue that both of these use-cases
should be crammed into one library, otherwise users should not have access
to either. Here are some related facts:

* No one has submitted a JSON library of any kind for review to Boost *ever*
* The most popular JSON libraries implement JSON-DOM, not JSON Serialization
* Even one of the most popular serialization libraries,
Boost.Serialization, does not offer a JSON archive implementation
* Boost.Property tree supports JSON-DOM out of the box, but not JSON

I find it interesting that people are coming out of the woodwork who claim
to have written their own JSON libraries, that say REJECT to Boost.JSON,
because they feel that conversion between JSON and user-defined types is of
the utmost importance and that Boost can't have a JSON library without it.

* If this is so important, why does Boost.Serialization not have it?
* Why is no one submitting a pull request to Boost.Serialization for a JSON
* Why has no one proposed a library to Boost which implements JSON
* Why doesn't Boost.PropertyTree have JSON-DOM but no JSON Serialization?
* Where are the immensely popular JSON Serialization libraries?

Meanwhile the JSON For Modern C++ repository has over 20,000 GitHub stars
and Tencent's RapidJSON repository has almost 10,000 GitHub stars. In a
sense these libraries have become standards, which is a shame since they
both have defects which I believe Boost.JSON addresses. Clearly the
JSON-DOM use case is popular (these libraries also do not offer JSON
Serialization). Where are the immensely popular JSON Serialization

Not to put too fine a point on it...but these arguments against Boost.JSON
do not withstand any sort of scrutiny; rational readers should find them
entirely unconvincing.


Boost list run by bdawes at, gregod at, cpdaniel at, john at