8 Dec
2019
8 Dec
'19
3:22 p.m.
On 2019-11-30 19:35, Vinnie Falco wrote:
So if I want to go from a JSON archive to my user-defined struct T, using Boost.Serialization, then the path is from JSON to a map/unordered_map, and then to T?
No. The path is directly from JSON to T, where the user decides what T is. So T could be a map, an unordered_map, or a vector of pairs if the user wish to preserve the insertion order. In lieu of C++ reflection, Boost.Serialization has to be told how to serializer to T, but there is support for some standard containers.