gpt4 book ai didi

使用 unicode 字符解析 Json

转载 作者:行者123 更新时间:2023-12-01 08:17:48 25 4
gpt4 key购买 nike

我有一个带有 unicode 字符的 json 文件,但我无法解析它。我在 Flash CS5,JSON 库中尝试过,并且我在 http://json.parser.online.fr/ 中尝试过它我总是收到“意外的 token - eval 失败”

对不起,语法确实有问题,它来自客户端。

有人可以帮帮我吗?谢谢

最佳答案

Quoth the RFC:

JSON text SHALL be encoded in Unicode. The default encoding is UTF-8.



所以正确编码的 Unicode 字符应该不是问题。这让我相信它没有正确编码(也许它使用 latin-1 而不是 UTF-8)。你是如何创建文件的?在文本编辑器中?

关于使用 unicode 字符解析 Json,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6019327/

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