format stdClass objects as maps