On 1/11/10 8:26 PM, DBJDBJ wrote:
Simple and effective ... Thanks.
My approach is 'slightly' different ( http://dbj.org/dbj/?p=470 ) but
perhaps sacrifices size and simplicity to be (maybe) faster.
Does anyone know why CHROME window.JSON.parse accepts non-standard
strings ? I am writing this in CHROME 4.0.228.1.dev and it accepts all
sorts of crazy JSON strings ... I am kind of a hoping they forgot to
notice this problem?
Perhaps it would be worth commenting on the following Chromium bug:
http://code.google.com/p/chromium/issues/detail?id=30176&q=JSON.parse&colspec=ID%20Stars%20Pri%20Area%20Type%20Status%20Summary%20Modified%20Owner%20Mstone%20OS
On Jan 12, 12:55 am, John Resig<jere...@gmail.com> wrote:
As a note: I added identical errors earlier today but skirted around
the need to have any sort of support
property:http://github.com/jquery/jquery/commit/44e6beb10304789044de2c5a58f5bb...
--John
On Mon, Jan 11, 2010 at 7:51 PM, AlexSexton<alexsex...@gmail.com> wrote:
I went ahead and wrote a support flag and an implementation of a check
for nonstandard window.JSON.parse methods (including chrome) inside of
the ajax httpData method.
My change is
here:http://github.com/SlexAxton/jquery/commit/57313eb69a7c87f862440b06293...
I think consistently throwing errors on invalid json could prove to be
pretty important until browsers even out support a little bit. Anyone
see any issues with this implementation?
Alex
On Jan 10, 5:48 pm, DBJDBJ<dbj...@gmail.com> wrote:
Actually the simplest "way out" is to have new jQuery.support member :
jQuery.support.nonstandard_json_string =
function () {
try { JSON.parse("{ a : 1 }"); return true ; } catch(x)
{ return false; }
}();
As far as I know "only" in CHROME :
jQuery.support.nonstandard_json_string === true ;
Having this implement JSON parsing logic in 1.4 ...
--DBJ
--
You received this message because you are subscribed to the Google Groups "jQuery
Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group
athttp://groups.google.com/group/jquery-dev?hl=en.
--
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en.