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

java.net.URL support in groovy.json.JsonBuilder

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0-beta-1
    • 1.8.5, 2.0-beta-2
    • JSON

    Description

      Test.groovy
      json = new groovy.json.JsonBuilder(new URL('http://groovy.codehaus.org/'))
      assert json.toString() == '"http://groovy.codehaus.org/"'
      
      Output
      assert json.toString() == '"http://groovy.codehaus.org/"'
             |    |          |
             |    |          false
             |    {"protocol":"http","file":"/","port":-1,"query":null,"host":"groovy.codehaus.org","path":"/","authority":"groovy.codehaus.org","content":{},"userInfo":null,"ref":null,"defaultPort":80}
             {"protocol":"http","file":"/","port":-1,"query":null,"host":"groovy.codehaus.org","path":"/","authority":"groovy.codehaus.org","content":{},"userInfo":null,"ref":null,"defaultPort":80}
      

      Attachments

        Activity

          People

            guillaume Guillaume Sauthier
            jonny Jonny
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: