Boost logo

Boost Users :

Subject: [Boost-users] [Serialization : decending compatibility] Additional attributes prevent de-serialization by previous
From: francoisramond_at_[hidden]
Date: 2009-08-20 07:45:14


Hello,

I work on an industrial application which uses XML Boost Serialization as a
way to store and retrieve production scheduling solutions from XML files.
I've been using Serialization for years and I really enjoy the ease of use
and the flexibility it provides.

Recently, I released a new version (say V2) of that application, in which
some C++ classes have additional attributes of new classes with respect to
the previous version (V1). The new software (V2) can still read files
serialized by the earlier version V1 (ascending compatibility), but XML
files serialized by V2 cannot be read by V1.

I guess Boost Serialization wasn't designed for such "descending
compatibility", nevertheless, during industrial production some unexpected
bug on V2 might require to use V1 again (as it is stable), without loosing
the scheduling solutions generated by V2.

 From an XML file generated by V2, I somehow managed to remove the parts XML
associated to the new attributes (the additional information can be
skipped), and re-number some class_id to make the file readable by V1, but
this is quite time-consuming, and I can't automate this process since the
numbering of class_id depends on the solution serialized.

Any idea to make V2 serialized files readable by V1, either by modifying V2
or by an automated process to edit the files (I can't bring any
modification to the source code of V1) would be really appreciated.

Thanks for reading till here and, hopefully, for your help,
François



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