4 ms·
Doesn't Java lack a JSON parser in the standard library?
by grondo4 10y ago
Doesn't Java lack a JSON parser in the standard library?
- prodigal_erik 10y agoThe standard Java library includes a JavaScript interpreter, so there has to be a parser for object literals in there somewhere.
- tree_of_item 10y agoObject literals aren't JSON, though.
- Volt 10y agoJS has stringify and parse, so there ought to be a JSON parser somewhere.
- dfox 10y agoOne thing that the article mentions is that there are in fact strings that are valid JSON but not valid JS object literals.
- Macha 10y agohttps://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse https://developer.mozilla.org/en/docs/Web/JavaScript/Referen... A modern JS implementation should also have a JSON parser
- amake 10y agoAs of Java 8, the Nashorn JavaScript engine is included by default, and it does support JSON parsing. [1] http://winterbe.com/posts/2014/04/05/java8-nashorn-tutorial/ http://winterbe.com/posts/2014/04/05/java8-nashorn-tutorial/