groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Wagenleitner <>
Subject Re: "Parsing JSON is a mine field" <-- to read to improve Groovy's support
Date Fri, 28 Oct 2016 21:22:41 GMT
On Thu, Oct 27, 2016 at 1:25 AM, Guillaume Laforge <>

> Hi there,
> I just saw this article yesterday: "Parsing JSON is a mine filed"
> I haven't read it (yet) in details, but we might be able to improve
> Groovy's JSON parsing support by going through all the corner cases listed,
> see how we fare, and see if/how we can fix those cases.

Quickly ran those test json files through Groovy's JSON parsers.  For the
most part it didn't fail on ones marked as should fail because the Groovy
parsers are pretty lenient with extra characters appearing after the
closing brackets/braces.  I created a ticket [1] for one that I think
should fail because it produces inaccurate data.

The only file it failed to parse that was marked as should succeed was
y_number_huge_exp.json [2] because BigDecimal doesn't handle exponents with
more than 10 digits (leading zero's excluded).



View raw message