Parse JSON Object from URL in Groovy
Seems to me that you need a recent version of Groovy
for this to work (2.2.1
seems to be OK but 2.1.9
is not). In the mean time (until Groovy
is upgraded and if the data you are receiving is not too big) you could use something like this:
def card = new JsonSlurper().parseText(apiUrl.text)