Groovy web console

subscribe to the feed Subscribe
to this
site
test-json (via #groovywebconsole)
tweet this snippet Tweet
this
script

test-json

Published 1 month ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
import groovy.json.JsonOutput;

def data = [:]
data['toto'] = 'tata'

def json = JsonOutput.toJson(data) 

println json