Boost logo

Boost Users :

Subject: [Boost-users] Serialization to human-readable formats
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2010-10-27 20:18:34


Hi,

I have a library reading/writing data from binary files.
The library defines collection of type representing schema and data
stored in the files. Definition of those elements is versioned, so one
file can be slightly different than other.
The de-/serialization from/to those files is implemented, so it's not
part of my problem.

I'm looking for recommendation of tools to based implementation of
serialization of those objects to/from human-readable format like
XML, JSON, other text-based formats.
I'm looking for non-intrusive solution with degree of extensibility,
so new formats can be added if needed. Ideally, if the mechanism
could be aware of the versions of objects being serialized.

I have never used the Boost Serialization library, but reading its
documentation suggests it may fit the problem well.
UDT can be instrumented with serialization mechanism in non-intrusive
way. There are some archivers provided and, as far as I understand,
new can be added.
There are also other tools like Boost Property Tree or even Spirit
Qi/Karma which technically could do the job, I think.

There is also this naive option dangling around, which is
implementation of << and >> operators for my types.

Hoping I've described what I need fairly well, I'd like to ask
for some suggestions which option sounds better.
Perhaps I've missed some details or possibilities, thus any
brainstorming is welcome.

Best regards,

-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net