serialization of maps