Serialization for map file format