Hacker News new | ask | show | jobs
by prodigal_erik 3524 days ago
The standard Java library includes a JavaScript interpreter, so there has to be a parser for object literals in there somewhere.
1 comments

Object literals aren't JSON, though.
JS has stringify and parse, so there ought to be a JSON parser somewhere.
One thing that the article mentions is that there are in fact strings that are valid JSON but not valid JS object literals.
https://developer.mozilla.org/en/docs/Web/JavaScript/Referen...

A modern JS implementation should also have a JSON parser