<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 80: Ability to escape single and double quote together</title><link href="https://sourceforge.net/p/json-lib/feature-requests/80/" rel="alternate"/><link href="https://sourceforge.net/p/json-lib/feature-requests/80/feed.atom" rel="self"/><id>https://sourceforge.net/p/json-lib/feature-requests/80/</id><updated>2009-03-05T02:28:03Z</updated><subtitle>Recent changes to 80: Ability to escape single and double quote together</subtitle><entry><title>Ability to escape single and double quote together</title><link href="https://sourceforge.net/p/json-lib/feature-requests/80/" rel="alternate"/><published>2009-03-05T02:28:03Z</published><updated>2009-03-05T02:28:03Z</updated><author><name>steveneo</name><uri>https://sourceforge.net/u/steveneo/</uri></author><id>https://sourceforge.neta80092acb1b93c265d211f16d1c29bfd5998831a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I find JSonArray automatically escape double quote as it is used in JSON separator. But single quote does not escape. This fits most scenarios but annoy in some cases.&lt;/p&gt;
&lt;p&gt;For example, in JSP code, JSON string may be embedded as string in javascipt directly, ie,&lt;/p&gt;
&lt;p&gt;function test(){&lt;br /&gt;
var jsonStr = '${jsonVariable}';&lt;br /&gt;
...&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;${jsonVariable} is JSTL output. The trouble is, that javascript variable is illegual whatever it is enclosed by double or single quote if the JSON string include single quote. For example [{"abc":"single ' quote"}], here double/single both occpied...&lt;/p&gt;
&lt;p&gt;So, it is good if JSONConfig has an option to allow users to escape both single and double quote...&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>