Make serialization format pluggable