Skip to content

Instantly share code, notes, and snippets.

@kousen
Created November 20, 2019 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kousen/b619407bb02d2bffd4be191d2e4bc926 to your computer and use it in GitHub Desktop.
Save kousen/b619407bb02d2bffd4be191d2e4bc926 to your computer and use it in GitHub Desktop.
import groovy.json.*
String jsonTxt = 'http://api.open-notify.org/astros.json'.toURL().text
def json = new JsonSlurper().parseText(jsonTxt)
println "There are ${json.number} people in space"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment