Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2019-11-17 15:40:03

Bjorn Reese wrote:

> Should there be a JSON archive for Boost.Serialization?

There are many possible ways to write Boost.Serialization JSON archives,
depending on the JSON produced. You could for instance output structs as
`{ "x": 1, "y": 2 }`, or `[ "x", 1, "y", 2 ]`, or `[ 1, 2 ]`, or even `{
"size": 3, "data": [ 1, 2 ] }`. The first representation is the most natural
and human-editable, but can't be deserialized incrementally because the
fields can come in any order. (Arrays can also include the size or not.)

Assuming we're talking about the first option, it should be possible to use
the proposed JSON library to implement a JSON input archive that reads from
a json::value. The output archive doesn't really need a library.

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