Boost logo

Boost :

From: James E. King III (jking_at_[hidden])
Date: 2019-11-17 19:41:51


On Sun, Nov 17, 2019 at 11:06 AM Robert Ramey via Boost
<boost_at_[hidden]> wrote:
>
> On 11/17/19 7:40 AM, Peter Dimov via Boost wrote:
> > 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,
>
> Human editable archives are something people ask for. But it's not
> really possible in a general way because archives have to reflect the
> the C++ data structures that they correspond to. If one want's to be
> able to edit data off line - better would be to start with a free
> standing archive design using something like google protocol buffers.
> Then you're into the normal trade offs regarding such libraries.
>

Since you already support JSON, if you supported YAML as well, you would
satisfy the human editable request.

- Jim


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk