Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
grondo4
· 10y ago · 0 comments
Doesn't Java lack a JSON parser in the standard library?
Comments
[–]
amake
10y ago
As 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/
[–]
prodigal_erik
10y ago
The standard Java library includes a JavaScript interpreter, so there has to be a parser for object literals in there somewhere.
[–]
tree_of_item
10y ago
Object literals aren't JSON, though.
[–]
Volt
10y ago
JS has stringify and parse, so there ought to be a JSON parser somewhere.
[–]
dfox
10y ago
One thing that the article mentions is that there are in fact strings that are valid JSON but not valid JS object literals.