【发布时间】:2009-11-29 23:32:28
【问题描述】:
我正在使用 JSON.parse 作为产品列表。我正在运行一个正则表达式来替换破坏解析的字符:
[\n|\t|\r]
在将以下内容复制到 html 时,我似乎仍然遇到问题。
<p><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, Verdana, Helvetica; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">A soul mate for your aluminum group lounge chair. Rest your weary feet on this matching ottoman - same suspension design, same light weight, same elegant scale as the lounge chair. Polished aluminum 4-star base, black pedestal. Glides.</span></p>
不确定是哪个部分破坏了解析器,以及我可以做些什么来修复它,除了删除样式和跨度标签。
【问题讨论】:
-
请向我们展示实际的 JSON。
标签: javascript jquery json