Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

最新的2.12版本http调用图片base64 ocr 返回为什么不是正常的json 会有换行符的存在破坏掉json格式 #575

Open
1 task done
442830589 opened this issue Jun 26, 2024 · 2 comments

Comments

@442830589
Copy link

Issues

  • I have browsed through the Issues. 我已浏览过Issues,确定没有重复的建议。

Expected behavior 预期的功能

http接口调用返回的是这样的json

"a":{"b":"1","c":"
2"}}

Approximate reference (optional) 近似的参考(可选)

No response

@qwedc001
Copy link
Contributor

你好,请提供你的识别样本和调用接口的指令

@hiroi-sora
Copy link
Owner

返回值json中可能存在转义后的换行符 "\n" (即反斜杠+n),但不会存在换行符符号本身。也就是,返回值必然是单行字符串,不会是多行,可以正常解析json。

可能你拿到返回值后做了一次反转义,将 "\n" 转为了换行符。请尝试对原始返回值 直接做json解析。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants