Im confused about something with JSON.encode:
According to the docs, doing this:
JSON.encode({apple: 'red', lemon: 'yellow'});
-- should result in this:
'{"apple":"red","lemon":"yellow"}'
-- but instead in firebug I get this
"{"apple":"red","lemon":"yellow"}"
-- see the difference? The bounding quotes are double quotes, not
single quotes (which I think is the de-facto standard for proper
formatting of a JSON string). I only noticed this when all the JSON
data Im sending to my PHP parser was filled to the brim with escaping
slashes and junk.
Since the double quote is supposed to be reserved for strings, is this
a bug or bad behaviour by design? Either way, it seems the docs are
incorrect.
Thanks
Jacob
--
Subscription settings:
http://groups.google.com/group/mootools-users/subscribe?hl=en