On 21. Sep 2020, at 19:44, Vinnie Falco via Boost
wrote: On Mon, Sep 21, 2020 at 10:29 AM Mathias Gaunard
wrote: In both cases, I'd like to read/write my data from/to JSON with the same framework.
Why? What specifically, is the requirement here?
What I'd like is a way to describe how my C++ types map to a key-value structure with normalized types so that I can easily convert my objects back and forth through a structured self-describing and human-readable interchange format.
Right, but what I'm asking you is: *specifically* in what way would a framework that offers both JSON DOM and JSON Serialization be "consistent?" Can you show in terms of declarations, what that would look like? In other words I'm asking you to show using example code how putting these two separate concerns in a single library would offer benefits over having them in separate libraries.
The Boost.Serialization framework is able to do both. The two things needs are a) a JSON archive that follows the Archive concept b) a serialize function for json::value Once you have these two, you can convert the DOM type and/or any custom type to JSON and back.