You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@groovy.apache.org by Pascal Schumacher <pa...@gmx.net> on 2015/11/19 20:33:03 UTC

JsonSlurper LAX parser with invalid number handling

Hello everybody,

any opinions on how the Json LAX parser should handle an invalid number?

a) fail parsing
b) parse it as string
c) fail on access

See: https://issues.apache.org/jira/browse/GROOVY-7630 and 
https://github.com/apache/incubator-groovy/pull/189 for details.

Thanks to John for all the work he put into this.

-Pascal

Re: JsonSlurper LAX parser with invalid number handling

Posted by Guillaume Laforge <gl...@gmail.com>.
Hi Pascal,

For me, if it's an invalid number, it should fail on parsing.

Guillaume

On Thu, Nov 19, 2015 at 8:33 PM, Pascal Schumacher <pascalschumacher@gmx.net
> wrote:

> Hello everybody,
>
> any opinions on how the Json LAX parser should handle an invalid number?
>
> a) fail parsing
> b) parse it as string
> c) fail on access
>
> See: https://issues.apache.org/jira/browse/GROOVY-7630 and
> https://github.com/apache/incubator-groovy/pull/189 for details.
>
> Thanks to John for all the work he put into this.
>
> -Pascal
>



-- 
Guillaume Laforge
Apache Groovy committer & PMC member
Product Ninja & Advocate at Restlet <http://restlet.com>

Blog: http://glaforge.appspot.com/
Social: @glaforge <http://twitter.com/glaforge> / Google+
<https://plus.google.com/u/0/114130972232398734985/posts>

Re: JsonSlurper LAX parser with invalid number handling

Posted by Guillaume Laforge <gl...@gmail.com>.
Hi Pascal,

For me, if it's an invalid number, it should fail on parsing.

Guillaume

On Thu, Nov 19, 2015 at 8:33 PM, Pascal Schumacher <pascalschumacher@gmx.net
> wrote:

> Hello everybody,
>
> any opinions on how the Json LAX parser should handle an invalid number?
>
> a) fail parsing
> b) parse it as string
> c) fail on access
>
> See: https://issues.apache.org/jira/browse/GROOVY-7630 and
> https://github.com/apache/incubator-groovy/pull/189 for details.
>
> Thanks to John for all the work he put into this.
>
> -Pascal
>



-- 
Guillaume Laforge
Apache Groovy committer & PMC member
Product Ninja & Advocate at Restlet <http://restlet.com>

Blog: http://glaforge.appspot.com/
Social: @glaforge <http://twitter.com/glaforge> / Google+
<https://plus.google.com/u/0/114130972232398734985/posts>