You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (Jira)" <ji...@apache.org> on 2020/04/12 17:56:00 UTC

[jira] [Resolved] (GROOVY-9504) Add support for Path to slurper classes

     [ https://issues.apache.org/jira/browse/GROOVY-9504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Sun resolved GROOVY-9504.
--------------------------------
    Fix Version/s: 3.0.4
                   4.0.0-alpha-1
         Assignee: Daniel Sun
       Resolution: Fixed

The proposed PR has been merged. Thanks a lot for your contribution!

> Add support for Path to slurper classes
> ---------------------------------------
>
>                 Key: GROOVY-9504
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9504
>             Project: Groovy
>          Issue Type: Improvement
>          Components: groovy-yaml, JSON, XML Processing
>            Reporter: paolo di tommaso
>            Assignee: Daniel Sun
>            Priority: Minor
>             Fix For: 4.0.0-alpha-1, 3.0.4
>
>
> The classes `JsonSlurper`, `YamlSlurper` and `XmlSlurper` allow the parsing of the content of a file object specified as `File` object, however, it's missing a `parse` method taking the [Path|[https://docs.oracle.com/javase/8/docs/api/java/nio/file/Paths.html]] interface as a argument. 
>  
> As a workaround, it's possible to convert a `File` to a `Path` using the `toPath()` method however this does not fully support the new API features, notably the ability to reference and therefore access foreign files e.g. non-local files such as in-memory, S3, etc. 
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)