add support stdClass with json_encode