s11n.net
s11nlite::save(Anything, Anywhere);
Project powered by:
SourceForge.net

Welcome to s11n.net!

s11n (an abbreviation for serialization) is an Open Source project focused on the generic serialization of objects (i.e., object persistence) in the C++ programming language. If you're not a C++ programmer then this site will have nothing terribly interesting for you. If you are, however, then come in and find out how to save your data...

The project's flagship library, appropriately named libs11n, can easily serialize all manner of PODs (Plain Old Data types), most STL containers, and user-defined Serializable types. By taking advantage of relatively new, advanced C++ techniques s11n turns this formerly-difficult task into child's play. It supports literally hundreds of millions of combinations of standard containers out of the box. libs11n is 100% data-format agnostic, and currently includes support for many formats, including 3 XML flavours. (As far as i am aware, this exceeds support provided by any other serialization framework, regardless of the implementation language!)

A short history of this project, and an overview of its goals, can be found here. A more "dramatic" description can be found on the s11n's Dream page.

We will now refer the reader to the abundant documentation available via these pages:
My many, many thanks to those of you who have continued to feed back on these libraries! Your feedback has led to massive improvements in usability and functionality.
----- stephan beal

Recent News:

(subscribe to the news via RSS 2.0: here)
(More news and information about ongoing development can be found on blog.s11n.net.)

Fri Jun 6 00:42:06 CEST 2008
1.2.7 and 1.3.1 released
As always: http://s11n.net/download/

1.2.7: (stable branch)

- added de/serialize_versioned(), for simple version checking support.

- Added a fix which allows a Serializable to register with multiple Serializable base types. i didn't realise that wasn't working until a couple days ago. This change *may* affect some users who implement their own s11n_traits specializations.

1.3.1: (unstable/development branch)

- s11nlite: s/nullary_string/string_nullary/g for consistency with the related code.

- removed the new mutex and rcptr classes for now... there's simply not much use for them in the library.

- removed the uu:// URL handler. i mean, who's actually gonna use it?

- Renamed [de]serialize_f to [de]serialize_binary_f, for consistency.

- Added vappendf() family of functions, which are similar to printf() and format_string() but are more flexible. format_string() is now re-implemented on top of these functions.

- Added format_string() overloads which use a dynamically-growing buffer, to get rid of the format string length limit.

- Added optional support based on C++0x features. See for details. Requires gcc 4.3 or some other compiler with C++0x variadic templates support.

- The new de/serialize_versioned() funcs support simple version checking for specific objects or trees.

- Added base64 encode/decode routines, plus bindata_ser and bindata_deser helpers for de/serializing base64-encoded data. See .

Fri, 9 May 2008 14:00:00 GMT
Variadic templates and s11n
The s11n 1.3 branch now has some experimental new features based on new C++0x features supported by gcc 4.3. See this blog entry for details and examples:
http://blog.s11n.net/?p=53

Wed, 23 Apr 2008 14:00:00 GMT
1.3.0 release
While i've had the 1.3.0 source tree ready to release for the better part of a year, i have simply been too lazy to deal with it. Finally, 1.3.0 is out. Per long-standing convention, releases with an odd minor number (the "3" in 1.3.x) are development/unstable releases. Their APIs are subject to change at any given time, though historically speaking that doesn't happen often.

The only notably significant change in this version is the ability to handle URLs as sources and targets for serialization. How this is internally handled is likely change significantly, but some proof-of-concept code implements de/serialization over ssh connections, deserialization over http/ftp, and serialization over mailto://user@domain URLs. Also, there's a new serializer which writes out JavaScript code (it can only serialize, not deserialize).

It's available on the s11n.net downloads page or via SourceForge.

Sun, 08 Jul 2007 03:54:51 GMT
JSON-like serializer
While i wrote this code a year or so ago, i never included it into the source tree because i considered it to be too esoteric. Now, with all of the recent revival of JavaScript as a driving force behind Web 2.0, and JSON as a data interchange format, i've added the js_serializer to the 1.3.x source tree. It serializes C++ objects to a JSON-like grammar, but it is not 100% JSON compatible in that it uses anonymous functions to generate some values instead of using hard-coded values. That means that the generated code is trivial to use from JavaScript (simply eval() it), but not strictly compatible with JSON parsers written in non-JavaScript languages. This serializer does not know how to DEserialize - it is write-only.

If anyone is seriously interested in using this serializer along with libs11n 1.2.x, please get in touch (http://s11n.net/home/stephan/) and i will port it into that tree, otherwise i will not bother.

In theory the generated JavaScript data can be used with any JavaScript engine, in any application, and does not use any functions which rely on a web browser. e.g., it can be used in C/C++ projects based on the SpiderMonkey or Rhino JS engines.

Wed, 20 Jun 2007 04:29:16 GMT
okay, okay, we're switching to subversion...
After trying out subversion on a few other project trees, i am finally convinced that it is indeed an improvement over CVS. The inability to host multiple, truly independent repositories inside one SVN root still bugs me, but i'll get over it. e.g., it is possible, with one svn command, to check out the whole svn root and all repos under it. i don't like that because s11n is made up of several quasi-independent source trees. Anyway...

The 1.3 (head/development) branch has been imported into subversion (how the hell did it get to be 10MB big?), and all future development will take place there, as opposed to CVS. The 1.2 (stable) branch will stay in CVS, as no more than one more release of 1.2.x is expected. i did not bother to convert the older CVS tree to SVN format, so the source code history is lost (well, it's still in CVS). No big deal.

1.3 can be checked out with:

svn co https://s11n.svn.sourceforge.net/svnroot/s11n/trunk s11n


The tree will be undergoing significant build-related changes for the next few days (or whenever i get around to doing it), as i will be replacing the current build tools with the newest version of those tools, (toc.sf.net).

i still haven't checked my email recently (well, not since February or March), but i can be reached via the email address listed at www.wanderinghorse.net/home/stephan/.


This project developed in conjunction with:

s11n's author is kept alive by the motherly support of Peter & Paul Apotheke, of Baierbrunn, Germany.
These web pages are lovingly hand-crafted using XEmacs and PHP, and are hosted by 1und1.de.