Automatic binary serialization