You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@groovy.apache.org by Paolo Di Tommaso <pa...@gmail.com> on 2020/04/11 17:44:05 UTC

JsonSlurper support for Path

Hi all,

I've just realised that JsonSluper does not have a parse method for a Path
parameter.

Would you consider a PR to add the support for it?


Cheers,
Paolo

Re: JsonSlurper support for Path

Posted by Paolo Di Tommaso <pa...@gmail.com>.
OK, makes sense

https://github.com/apache/groovy/pull/1220

p

On Sat, Apr 11, 2020 at 9:13 PM Guillaume Laforge <gl...@gmail.com>
wrote:

> No, directly on all the Slurper classes.
> Groovy 2.5 and beyond require at least JDK 7, and Path was introduced in
> JDK 7.
>
> Guillaume
>
>
> On Sat, Apr 11, 2020 at 8:57 PM Paolo Di Tommaso <
> paolo.ditommaso@gmail.com> wrote:
>
>> I agree. In which module/class it would be better to add them? groovy-nio
>> ?
>>
>>
>> p
>>
>> On Sat, Apr 11, 2020 at 8:41 PM Guillaume Laforge <gl...@gmail.com>
>> wrote:
>>
>>> To be consistent, XmlSlurper and YamlSlurper should also get this
>>> parse(Path) variant too then :-)
>>> That sounds worth a PR!
>>>
>>> On Sat, Apr 11, 2020 at 7:44 PM Paolo Di Tommaso <
>>> paolo.ditommaso@gmail.com> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I've just realised that JsonSluper does not have a parse method for a
>>>> Path parameter.
>>>>
>>>> Would you consider a PR to add the support for it?
>>>>
>>>>
>>>> Cheers,
>>>> Paolo
>>>>
>>>>
>>>
>>> --
>>> Guillaume Laforge
>>> Apache Groovy committer
>>> Developer Advocate @ Google Cloud Platform
>>>
>>> Blog: http://glaforge.appspot.com/
>>> Twitter: @glaforge <http://twitter.com/glaforge>
>>>
>>
>
> --
> Guillaume Laforge
> Apache Groovy committer
> Developer Advocate @ Google Cloud Platform
>
> Blog: http://glaforge.appspot.com/
> Twitter: @glaforge <http://twitter.com/glaforge>
>

Re: JsonSlurper support for Path

Posted by Guillaume Laforge <gl...@gmail.com>.
No, directly on all the Slurper classes.
Groovy 2.5 and beyond require at least JDK 7, and Path was introduced in
JDK 7.

Guillaume


On Sat, Apr 11, 2020 at 8:57 PM Paolo Di Tommaso <pa...@gmail.com>
wrote:

> I agree. In which module/class it would be better to add them? groovy-nio
> ?
>
>
> p
>
> On Sat, Apr 11, 2020 at 8:41 PM Guillaume Laforge <gl...@gmail.com>
> wrote:
>
>> To be consistent, XmlSlurper and YamlSlurper should also get this
>> parse(Path) variant too then :-)
>> That sounds worth a PR!
>>
>> On Sat, Apr 11, 2020 at 7:44 PM Paolo Di Tommaso <
>> paolo.ditommaso@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> I've just realised that JsonSluper does not have a parse method for a
>>> Path parameter.
>>>
>>> Would you consider a PR to add the support for it?
>>>
>>>
>>> Cheers,
>>> Paolo
>>>
>>>
>>
>> --
>> Guillaume Laforge
>> Apache Groovy committer
>> Developer Advocate @ Google Cloud Platform
>>
>> Blog: http://glaforge.appspot.com/
>> Twitter: @glaforge <http://twitter.com/glaforge>
>>
>

-- 
Guillaume Laforge
Apache Groovy committer
Developer Advocate @ Google Cloud Platform

Blog: http://glaforge.appspot.com/
Twitter: @glaforge <http://twitter.com/glaforge>

Re: JsonSlurper support for Path

Posted by Paolo Di Tommaso <pa...@gmail.com>.
I agree. In which module/class it would be better to add them? groovy-nio ?


p

On Sat, Apr 11, 2020 at 8:41 PM Guillaume Laforge <gl...@gmail.com>
wrote:

> To be consistent, XmlSlurper and YamlSlurper should also get this
> parse(Path) variant too then :-)
> That sounds worth a PR!
>
> On Sat, Apr 11, 2020 at 7:44 PM Paolo Di Tommaso <
> paolo.ditommaso@gmail.com> wrote:
>
>> Hi all,
>>
>> I've just realised that JsonSluper does not have a parse method for a
>> Path parameter.
>>
>> Would you consider a PR to add the support for it?
>>
>>
>> Cheers,
>> Paolo
>>
>>
>
> --
> Guillaume Laforge
> Apache Groovy committer
> Developer Advocate @ Google Cloud Platform
>
> Blog: http://glaforge.appspot.com/
> Twitter: @glaforge <http://twitter.com/glaforge>
>

Re: JsonSlurper support for Path

Posted by Guillaume Laforge <gl...@gmail.com>.
To be consistent, XmlSlurper and YamlSlurper should also get this
parse(Path) variant too then :-)
That sounds worth a PR!

On Sat, Apr 11, 2020 at 7:44 PM Paolo Di Tommaso <pa...@gmail.com>
wrote:

> Hi all,
>
> I've just realised that JsonSluper does not have a parse method for a Path
> parameter.
>
> Would you consider a PR to add the support for it?
>
>
> Cheers,
> Paolo
>
>

-- 
Guillaume Laforge
Apache Groovy committer
Developer Advocate @ Google Cloud Platform

Blog: http://glaforge.appspot.com/
Twitter: @glaforge <http://twitter.com/glaforge>