Re:Parsing JSON is a Minefield
by oblio on Wednesday October 26, 2016 @01:51PM
(#12798744)
If your language doesn't come with JSON in the stdlib, you're really on the cutting edge. Or using a language meant for embedding :)
[ Parent
| on HN ]
Doesn't Java lack a JSON parser in the standard library?
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/
Re:Parsing JSON is a Minefield
by prodigal_erik on Wednesday October 26, 2016 @05:23PM
(#12800723)
The standard Java library includes a JavaScript interpreter, so there has to be a parser for object literals in there somewhere.
Re:Parsing JSON is a Minefield
by tree_of_item on Wednesday October 26, 2016 @06:37PM
(#12801351)
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
> you're really on the cutting edge.
Or the other way around. Think about something like MUMPS.
Re:Parsing JSON is a Minefield
by differentman on Friday October 28, 2016 @11:13AM
(#12816682)
No, no thank you. Did it for a year. Pretty sure I don't even want to think about doing it again.