Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-9504

Add support for Path to slurper classes

    XMLWordPrintableJSON

Details

    Description

      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. 

       

       

      Attachments

        Activity

          People

            daniel_sun Daniel Sun
            pablo72 paolo di tommaso
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: