
On Mon, Sep 23, 2019 at 6:44 AM Glen Fernandes wrote:
On Mon, Sep 23, 2019 at 5:19 AM Dominique Devienne via Boost
Also, in client/server communications, it's less often a few huge JSON documents, but rather lots of small documents, so the constant "startup" time of the parser matters too, and in that same vein, a PULL-parser that allows to build the native data-structures directly, rather than the DOM-like approach of fully converting the document to a built-in JSON object, and then convert that to the native-structure, avoids the temp document, which is especially useful for large documents.
It looks like nlohmann/json now has this kind of API too: 1. https://tinyurl.com/nl-json-parse 2. https://tinyurl.com/nl-json-parse-callback
That is the use case that I find more interesting. If you want to decouple your data representation in your program from the serialization format. e.g. In memory if your data structure is something like: vector