相关疑难解决方法(0)

如何使用PHP在JSON数据中转换十六进制代码

我有一些由Drupal CMS生成的内容,其中包含以下字符串:

"... \n Proficient knowledge of \x3cstrong\x3emedical\x3c/strong\x3e terminology; typing skills at 40 wpm. Excellent communication and ... which involves access to sensitive and/or confidential \x3cstrong\x3emedical\x3c/strong\x3e information. Must demonstrate leadership skills in decision making and ..."
Run Code Online (Sandbox Code Playgroud)

我正在尝试将此数据作为json传输,但它不会验证.我认为这是因为字符\x3c可能需要使用更长的6字符格式(参见http://tools.ietf.org/html/rfc4627,2.5. - 字符串).

这实际上是问题吗?如果是这样,有没有一种转换格式的好方法?

编辑:这里有两个完整的json样本未通过验证

{ "results": [ { "link": "http://dev.careersatnmc.org/content/clinical-information-clerk-patient-financial-services-11-12", "type": "", "title": "Clinical Information Clerk, Patient Financial Services, #11-12", "user": "", "date": "1337699702", "node": "", "extra": "", "score": 1.9532660466727E+25, "snippet": "... \n Proficient knowledge of …
Run Code Online (Sandbox Code Playgroud)

php format unicode hex json

0
推荐指数
2
解决办法
4391
查看次数

标签 统计

format ×1

hex ×1

json ×1

php ×1

unicode ×1