Groovy web console

subscribe to the feed Subscribe
to this
site

JsonSlurper Example 1

Published 5 months ago by Amol Chavan
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
import groovy.json.JsonSlurper;
String text = '{"Message":"Hello World!","Joe":"How are you doing?"}'
JsonSlurper jsonSlurper = new JsonSlurper()
Object result = jsonSlurper.parseText(text)
println result.getClass()