You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently any JSON that can't be parsed is simply dumped into the output raw
with no indication as to the problem.
It would be better if we could detect exactly what's wrong with the invalid
JSON and report that to the user. I thought about using JSONlint but can't see
any visible licensing, so built my own JSON parser using PEG.js - seems to have
more user-friendly error messages even if it is a bit slower (shouldn't be a
problem once we're formatting asynchronously and as long as we only run it for
invalid JSON) and larger.
Detecting problems in JSON-P on the other hand seems to require a full
JavaScript parser, and that bloats our XPI significantly (even my feeble
attempt at just the secure JSON-P suggested at json-p.org enlarges the JSON
parser five-fold).
Original issue reported on code.google.com by [email protected] on 3 Jun 2011 at 10:21
Original issue reported on code.google.com by
[email protected]
on 3 Jun 2011 at 10:21The text was updated successfully, but these errors were encountered: