About Serialization

Serialization in C++ is not an easy thing. The language lacks reflection, so any serialization must be tacked on manually. I looked at several approaches from, for example, boost serialization, google protocol buffers, libs11n, and the C++ FAQ Lite, and tried to put together the simplest serialization library that would still be useful. If you need more features, check out those alternatives.

The Library

The library is so small that it's actually just a header file. In the download package there's a test harness (use SCons to build the test application, if you're interested). Simple text and binary formats are provided, as well as a serializer provided just as a reflection interface. Writing your own format is easy. The unit testing framework is QuickTest from Tyler Streeter, another cool one-header library. The joeserialize.cpp file contains the unit tests, and shows an example of how the library is used. The library is distributed under the terms of the BSD-style license provided with the distribution. The unittest.h file is the work of Tyler Streeter and is distributed under a separate license as stated in that file.