On 11/23/19 7:18 PM, Lee Clagett via Boost wrote:
This entire section highlights my frustrations with the JSON format and most C++ JSON implementations. The bulk of cases are JSON -> specific data structure. The easiest implementation for JSON objects in C++ is storing all fields to a temporary DOM and then doing a lookup when mapping to a data structure. I wrote an implementation for msgpack (not fully tested :/) that uses C++ template variadics to skip the DOM step;
I did this for a related binary format called BinToken: https://github.com/breese/trial.protocol/tree/develop/include/trial/protocol... It supports both low-level iteration over the binary format, serialization directly into C++ data structures, and DOM parsing. I used to have a MsgPack (and UBJSON) implementation as well, but I did not upgrade them after a major redesign because I had no personal use for them.