Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

JSON.parse(bad_json_string) stalls in node REPL #983

Closed
chbrown opened this issue Apr 26, 2011 · 1 comment
Closed

JSON.parse(bad_json_string) stalls in node REPL #983

chbrown opened this issue Apr 26, 2011 · 1 comment

Comments

@chbrown
Copy link

chbrown commented Apr 26, 2011

$ node
> JSON.parse('{{: xjnk123, null};;-=+')
...

It stalls, when it should throw an error right then and there. It breaks as expected when run as a script ($ node sandbox_json.js).

Thanks!

-Chris

@isaacs
Copy link

isaacs commented Apr 26, 2011

Ah, there's a trap for this, but only for "unexpected token ILLEGAL", not for "unexpected token {".

@isaacs isaacs closed this as completed in bbffd9e Apr 26, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants