
# 如何修改返回结果的response类型
使用使用python调用OCR API获取response中的具体内容时，如果需要对返回结果的response类型进行修改。可以使用 to_dict()、to_str() 进行格式转换，to_dict()是转换为json格式，to_str() 是转换为str格式。
图1response示例   
![](https://support.huaweicloud.com/ocr_faq/zh-cn_image_0000001595714958.png "点击放大")
