Are there any good existing C++ serialization libraries that support partial serialization? By partial serialization I mean that I might want to say, save the values of 3 specific members, and later be able to apply that saved copy to a different instance, only updating those 3 members and leaving the others intact. This would be useful for example for sending data over the network -- I have some object on a client and a server, and when a member changes on the server I want to send a message to the client containing the updated value for that member and that member only, I don't want to send a copy of the whole object over the wire. boost::serialization at a glance looks like it only supports all or nothing.
Although I'm not familiar with them, you could also check out Google's Protocol Buffers .
You're clearly not looking for serialization here.
Serialization is about saving an object and then recreating it from the stream of bytes. Think video games saves or the session context for a webserver.
Here what you need is messaging. Google's Protocol Buffers is nice for that. Specify a message that will contain every single field as optional, upon reception of the message, update your object with the fields that do exist and leave the others untouched.
The great thing with protobuf
is that it handles forward and backward compatibility nicely, as well as text and binary encoding (text being great for debugging and binary being better for pure performance), ...
And you can even decode the messages with another language (say python or ruby) if you save them somewhere and want to throw together a html gui to inspect it!