查看历史版本返回没啥问题,但报错

Viewed 70

回调接口:https://oawpstest.ueware.com/v3/3rd/files/19534/versions 返回错误:Json解析失败

{"data":[{"id":"19503","name":"关于同意中原油田工会补选工会副主席结果的批复.doc","version":1,"size":17920,"create_time":1698976074,"modify_time":1698976074,"creator_id":"242","modifier_id":"242"}],"code":0,"message":""}

2 Answers

您这边不返回 Unicode 编码,直接返回中文字符串试试? 可能是我们的测试接口转json时未处理。

请求结果反序列错误,返回的数据非 JSON 格式 (这是在线调试返回的错误)

{"code":0,"msg":"\u6210\u529f\u83b7\u53d6\u6570\u636e","data":[{"create_time":1696755819,"creator_id":"242","id":"19053","modify_time":1696755819,"name":"\u8c6b\u5de5\u529e\u30142023\u301539\u53f7.pdf","version":1,"size":17408}]}

这是我没有进行编码,转json的结果