serialize map on server