Have you found any bugs in Native JSON implementat

2020-05-02 07:59发布

What bugs, if any, have you found in the current batch of native JSON implementations?

FYI - this is meant to be a sort of central repo of native json bugs.

The reason I feel this is important is that the de-facto standard, json2.js, does not install itself if it finds a native implementation, so it is crucial to identify native bugs so that you can decide whether to force json2 to overwrite native if a bug affects your code.

标签: json
3条回答
▲ chillily
3楼-- · 2020-05-02 08:16

Chrome has a JavaScript implementation of JSON.stringify, instead of a native one, so it's actually slower than the JS one on JSON.org (although handles more edge cases).

http://code.google.com/p/chromium/issues/detail?id=22718

查看更多
爷的心禁止访问
4楼-- · 2020-05-02 08:22

Firefox 3.6 ignores the replacer return value in stringify.

bug report

test page

180 browser/platform combinations confirm bug

查看更多
登录 后发表回答