Side navigation
#9196 closed enhancement (invalid)
Opened May 09, 2011 03:38PM UTC
Closed May 09, 2011 04:06PM UTC
Last modified May 09, 2011 04:49PM UTC
parseJSON
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.next |
Component: | data | Version: | 1.6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If you have a jsonString like that {0 : "zero", 1 : "one"} the native parser failed (Firefox 3.6.13) but the json2.js parser gave a clean result.
Isn't it better to check ifs a valid jsonString before use the native parser?
Attachments (0)
Change History (2)
Changed May 09, 2011 04:06PM UTC by comment:1
component: | unfiled → data |
---|---|
resolution: | → invalid |
status: | new → closed |
Changed May 09, 2011 04:49PM UTC by comment:2
Then it's also useless to throw an "Invalid JSON" error at the end if it's insignificant for the parsers that the function get a valid JSON string...
your example isn't valid json and at the end of the day, json2 doesn't matter - the browser implementation does.