Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2019-11-30 20:04:53

On 11/30/19 10:35 AM, Vinnie Falco via Boost wrote:
> On Sat, Nov 30, 2019 at 10:29 AM Bjorn Reese via Boost
> <boost_at_[hidden]> wrote:
>> If the user deserializes the
>> input into a std::map then the data will become ordered. The user can
>> deserialize into another container if they wish to retain the unordered
>> nature of the data.
> 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?


an ijson_archive is intimately connected to the C++ data structures
which were used to produce the archive using ojson_archive class. The
are symetric pair.

So given your user-defined struct T, you can produce a compatible
archive using ojson_archive - and nothing else. Then you can load that
archive in to another instance of your user-defined T - but nothing else.

You user-defined T can contain any serializable type or inherit from any
serializable type. For better or worse, the definition "serializable
type" embraces a large majority of all C++ built-in types, library types
and any other user type which has a serialize function.

Robert Ramey

> Thanks
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at