Skip to content

Instantly share code, notes, and snippets.

@kdabir
Created August 3, 2016 04:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kdabir/3d3b101221951cc4edf6090942d3dd48 to your computer and use it in GitHub Desktop.
Save kdabir/3d3b101221951cc4edf6090942d3dd48 to your computer and use it in GitHub Desktop.
Parsing Json
import groovy.json.JsonSlurper
def json = new JsonSlurper().parseText("""
{
inline: "json"
}
""")
import groovy.json.JsonSlurper
def json = new JsonSlurper().parse(new URL("https://api.endpoint.foo"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment