> And to make it valid JSON, you have to quote all keys anyway
> (using double quotes):
>
> { "asJSON": 1, "class": "jlink", "id": htmlDoc }
>
> http://json.org/
Naw, that wouldn't be valid JSON. JSON doesn't allow named references like
htmlDoc.
But this object doesn't need to be JSON anyway. It's just an object literal
being passed into a JavaScript function call. From the original message:
$.getJSON(
"./ajax/json.php",
{ asJSON: 1, class: "jlink", id: htmlDoc },
function(json) { .... });
Quote the "class" and it should be good.
-Mike
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/