Skip to content

Commit a9ecfeb

Browse files
committed
Followup on gh-243. XML, not Markdown.
1 parent 747f05e commit a9ecfeb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

entries/jQuery.parseJSON.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
<li><code>{test: 1}</code> (test does not have double quotes around it).</li>
1515
<li><code>{'test': 1}</code> ('test' is using single quotes instead of double quotes).</li>
1616
</ul>
17-
<p>The JSON standard does not permit "control characters" such as a tab or newline. An example like `$.parseJSON('{"testing":"1\t2\n3"}')` will throw an error in most implementations because the JavaScript parser converts the string's tab and newline escapes into literal tab and newline; doubling the backslashes like `"1\\t2\\n3"` yields expected results. This problem is often seen when injecting JSON into a JavaScript file from a server-side language such as PHP.</p>
17+
<p>The JSON standard does not permit "control characters" such as a tab or newline. An example like <code>$.parseJSON('{"testing":"1\t2\n3"}')</code> will throw an error in most implementations because the JavaScript parser converts the string's tab and newline escapes into literal tab and newline; doubling the backslashes like <code>"1\\t2\\n3"</code> yields expected results. This problem is often seen when injecting JSON into a JavaScript file from a server-side language such as PHP.</p>
1818
<p>Where the browser provides a native implementation of <code>JSON.parse</code>, jQuery uses it to parse the string. For details on the JSON format, see <a href="http://json.org/">http://json.org/</a>.</p>
19-
<p>Prior to jQuery 1.9, `$.parseJSON` returned `null` instead of throwing an error if it was passed an empty string, `null`, or `undefined`, even though those are not valid JSON. </p>
19+
<p>Prior to jQuery 1.9, <code>$.parseJSON</code> returned <code>null</code> instead of throwing an error if it was passed an empty string, <code>null</code>, or <code>undefined</code>, even though those are not valid JSON. </p>
2020
</longdesc>
2121
<example>
2222
<desc>Parse a JSON string.</desc>

0 commit comments

Comments
 (0)