[OpenLayers-Users] problem consuming escaped single quotes in GeoJSON with a clustered vector layer

Moataz Elmasry zaza1851983ml at googlemail.com
Mon Jun 14 03:42:49 EDT 2010


I just tried your string with an online parser:
http://json.parser.online.fr/ and eval() returned an error.
You don't need to escape the single quote character since its inside a 
double quote, so just remove the slash \ and it should work


Eric Lemoine wrote:
> On Fri, Jun 11, 2010 at 2:34 AM, Zac Spitzer <zac.spitzer at gmail.com> wrote:
>   
>> Hi Eric,
>>
>> thanks for trying that.
>>
>> I have created a cut down test case which demonstrates the problem
>>
>> http://mapguide-central.ennoble.com.au/testcase/geo_json_escaping/testcase.html
>>
>> there are two vector layers, one which is escaped and one which isn't
>>
>> the escaped one is on by default and doesn't render
>>     
>
> Ok.
>
> But why are you escaping quotes? From my understanding you should not,
> only certain characters can escaped (with "\"), and the quote
> character isn't one of them. See <http://json.org>.
>
>
>   




More information about the Users mailing list