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

API接口如何返回json格式 #4258

Open
goactiongo opened this issue Mar 21, 2025 · 0 comments
Open

API接口如何返回json格式 #4258

goactiongo opened this issue Mar 21, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@goactiongo
Copy link

API调用fastgpt返回的是字符串,导致接口返回内容需要转义(如下),其他系统无法直接调用。请问该如何控制API返回的是一个有效的json


 "content": "[\n    {\n        \"公司\": \"兴业银行023-038号\",\n        \"公司 ID\": \"无\",\n        \"是否为内部公司\": false\n    },\n    {\n        \"公司\": \"什邡有限公司\",\n        \"公司 ID\": \"无\",\n        \"是否为内部公司\": false\n    },\n    {\n        \"公司\": \"乐心123有限公司\",\n        \"公司 ID\": \"无\",\n        \"是否为内部公司\": false\n    },\n    {\n        \"公司\": \"山23有限公司\",\n        \"公司 ID\": \"无\",\n        \"是否为内部公司\": false\n    },\n    {\n        \"公司\": \"限公司\",\n        \"公司 ID\": \"无\",\n        \"是否为内部公司\": false\n    },\n    {\n        \"公司\": \"云有限公司\",\n        \"公司 ID\": \"无\",\n        \"是否为内部公司\": false\n    },\n    {\n        \"公司\": \"山有限公司\",\n        \"公司 ID\": \"无\",\n        \"是否为内部公司\": false\n    },\n    {\n        \"公司\": \"临有限公司\",\n        \"公司 ID\": \"无\",\n        \"是否为内部公司\": false\n    },\n    {\n        \"公司\": \"临技有限公司\",\n        \"公司 ID\": \"无\",\n        \"是否为内部公司\": false\n    },\n    {\n        \"公司\": \"临沂责任公司\",\n        \"公司 ID\": \"无\",\n        \"是否为内部公司\": false\n    }\n]"
@goactiongo goactiongo added the bug Something isn't working label Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant