Transform object to a map on reading