Home › Forums › Bugs › JSON parser error with jqGrid 3.6.5
Hi,
I had a working site, then updated to version 3.6.5. (Also updated JQuery to 1.4.2 and JQueryUI to 1.8.1.)
Now, when I load my grid, the 'loadError' event triggers, and I get:
Here is the complete contents of a much shorter JSON response from the server:
{records:0,total:0,page:1,where:'Country is Bermuda, and Location is Boston',whereJson:'{“Country”:[“BMU”],”Location”:[“Boston”]}',rows:[]}
Even this response results in an “Invalid JSON” error.
HEllo,
You can look here:
http://www.trirand.com/jqgridwiki/doku.php?id=wiki:upgrade_from_3.6.4_to_3.6.5
Regards
Tony
Thanks… this will help a lot.
More questions:
1) Please confirm: the JSON used in coding and the JSON used in the data work must be formatted differently?
2)
Hello,
This is a needed change.
You will get the same error if you use jQuery 1.4 and use getJSON – just try – more info you can find here:
http://api.jquery.com/jQuery.getJSON/
See Important notes.
The d property is used in some Microsoft Systems.
For the record, in case others wonder about this…
From the JQuery site linked by Tony:
JSON is a data-interchange format with syntax rules that are stricter than those of JavaScript's object literal notation. For example, all strings represented in JSON, whether they are properties or values, must be enclosed in double-quotes.
Another entry, to help others…
I had this line in my .jqGrid() initializer:
Thanks for this. We should add it to the documentation.
tony said: Hello, This is a needed change. You will get the same error if you use jQuery 1.4 and use getJSON – just try – more info you can find here: http://api.jquery.com/jQuery.getJSON/ See Important notes. The d property is used in some Microsoft Systems. Regards Tony
tony said:
this url no working 😉
Stay connected with us in your favorite flavor!
Copyright 2014 TriRand LtdAll Rights ReservedRSS