[OpenLayers-Users] OpenLayers.Format.JSON not working
Mak Kolybabi
mak.kolybabi at telenium.ca
Thu Nov 26 11:57:59 EST 2009
I've wasted long enough on this, it's time to ask for help...
I'm making a simple Ajax request with OpenLayers.loadURL, which works perfectly.
If I process the return data with:
var info = eval("(" + response.responseText + ")");
a proper object is created in both IE and Firefox. But if I try to use:
var parser = new OpenLayers.Format.JSON();
var info = parser.read(response.responseText);
nothing happens. In fact, if I try:
var parser = new OpenLayers.Format.JSON();
var info = parser.read("{'a': 1}");
in the Firebug console, info will contain null.
Can anyone provide a guess as to what might be going wrong? Any help would be
much appreciated.
--
Mak Kolybabi
Programmer
Telenium Inc.
204-957-2821
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091126/5ea64302/attachment.bin
More information about the Users
mailing list