Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以转义冒号:它在 JSON 字符串中吗?当前此对象/值集
{ pn: "MT46H128M16LFCK-5 IT:A", visible: false, url: "/$ws$/29/1/products/ProductDetails.html?product=products/dram/MT46H128M16LFCK-5 IT" }
不被阅读。:A我怀疑这是由于pn价值。我如何逃脱它或以其他方式抓住它?
:A
pn
如果那是您的实际 JSON,那么您的问题是标识符(pn、visible、url)需要被引用(“pn”、“visible”、“url”)。
正如评论所说,冒号不需要在 JSON 字符串文字中转义。