0
Mein String istUnerwartete nicht Leerraum Fehler beim Parsen von String zu JSON-Objekt
"\"{'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"
ich die Zeichenfolge mit JSON Lint validiert, die sie als gültig JSON zeigt.
SyntaxError: JSON.parse: unexpected non-whitespace character afterJSON data at line 1 column 338 of the JSON data
Dies ist der Fehler erhalte ich, wenn ich $ .parseJSON (str) verwenden
Mögliche Duplikat [JSON.parse: unerwartete Nicht-Leerzeichen nach JSON-Daten in Javascript] (http://stackoverflow.com/questions/21515583/json-parse-unexpected-non-whitespace -character-nach-json-data-in-javascript) – Atula
Es ist wahrscheinlich am besten, wenn Sie einen https://jsfiddle.net/-Eintrag erstellen und ihn so verknüpfen, dass die Leute damit arbeiten und eine Lösung finden können. – Dale
Ersetzen Sie Ihre "mit & # 146" in Ihrer JSON-Zeichenfolge. Das ist es, woran JQuery erstickt. – Dale