gpt4 book ai didi

javascript - Json 未验证文件内容?

转载 作者:行者123 更新时间:2023-12-03 04:41:30 25 4
gpt4 key购买 nike

我已经用正常内容测试了我的 json 数据,工作正常。

示例数据如下:

工作 Json

 {
"language": "XYZ",
"content": {
"GEN": "this is test",
"EXO": "this is test"
}
}

无法使用 json

 {
"language": "XYZ",
"content": {
"GEN": "\id GEN\n\c 1\n\p\n\v 1 In the beginning God created the heavens and the earth.\n\v 2 And the earth was without form and was void form.",
"EXO": "\id EXO\n\c 1\n\p\n\v 1 Now these are the names of the children of Israel, which came to Egypt; every man and his household came with Jacob\n\v 2 Reuben, Simeon, Levi, and Judah"
}
}

Check screenshot for working and not working json

最佳答案

JSON 允许的唯一反斜杠转义序列是 \b\f\n\r\t\"。反斜杠的所有其他使用都必须转义为 \\。问题在于 \i (以及其他一些转义序列)对 JSON 没有任何意义,因此是语法错误。请将其写为 \\i

关于javascript - Json 未验证文件内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43069242/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com