0
我的字符串是意外的非空格错误在解析字符串JSON对象
"\"{'Body': '<p>I have a issue : When I add a content that includes text and hyperlink, after that I use the wrapLongStringIntoMultiLine to set length of each lines. But in the special case, the end of line is in scope of hyperlink, so the hyperlink structure is broken. \\r\\r\\nHere is my code :</p>\\r\\r\\n\\r\\r\\n<pre><code>String languages=\"\" Deutsch, English (All), English (United Kingdom), Bahasa Indonesia, Italiano <a href=\\\\\"\"\\\\\"\"> edit</a>\"\";\\r\\r\\n</code></pre>\\r\\r\\n\\r\\r\\n<p>after call wrapLongStringIntoMultiLine: </p>\\r\\r\\n\\r\\r\\n<pre><code><html>Deutsch, English (All), English (United Kingdom),</br> Bahasa Indonesia, Italiano <a href<br>=\\\\\"\"\\\\\"\"> edit</a>\"\";\\r\\r\\n</code></pre>\\r\\r\\n\\r\\r\\n<p>The <code><br> tag</code> exists in the scope of hyperlink. How to fix this issue? Please give me advise. Thanks</p>\\r\\r\\n', 'Title': 'Use the wrapLongStringIntoMultiLine on the Jeditor pane'}\"\r"
我已经验证使用JSON皮棉的字符串,其显示为有效的JSON。
SyntaxError: JSON.parse: unexpected non-whitespace character afterJSON data at line 1 column 338 of the JSON data
这是我收到的时候我使用$ .parseJSON(STR)
的可能的复制[JSON.parse:之后在javascript JSON数据意外非空白字符(http://stackoverflow.com/questions/21515583/json-parse-unexpected-non-whitespace -json-data-in-javascript) – Atula
这可能是最好的,你创建一个https://jsfiddle.net/条目并链接它,让人们可以工作瓦特/它给你一个解决方案。 – Dale
尝试在您的JSON字符串中替换您的\“&#146,这就是JQuery窒息的原因。 – Dale