Try to use the native JSON parser in all cases and fallback to the old technique...
authorjeresig <jeresig@gmail.com>
Tue, 5 Jan 2010 22:33:41 +0000 (17:33 -0500)
committerjeresig <jeresig@gmail.com>
Tue, 5 Jan 2010 22:33:41 +0000 (17:33 -0500)
commitff3645ee05ca5cb416b7d3500a45a4410ce0470a
treeb2a2183ba3913c09be059c22c5b5f911855d2451
parent3f648c4e3abe236b8ec6a19822313be794e5a9df
Try to use the native JSON parser in all cases and fallback to the old technique otherwise. This allows us to also handle cases where the JSON parser is unable to parse JSON-like strings correctly (e.g. {foo:bar}) which is something that worked before but would stop working with the switch to the new parser.
src/ajax.js