On Thu, Oct 27, 2016 at 1:25 AM, Guillaume Laforge <glafo...@gmail.com>
wrote:

> Hi there,
>
> I just saw this article yesterday: "Parsing JSON is a mine filed"
> http://seriot.ch/parsing_json.html
>
> 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).


[1] https://issues.apache.org/jira/browse/GROOVY-7979

[2]
https://github.com/nst/JSONTestSuite/blob/af9a79630a1233a023911bfbb22497cb14b44433/test_parsing/y_number_huge_exp.json

Reply via email to