Groovy web console

subscribe to the feed Subscribe
to this
site
Groovy JSON quotes (via #groovywebconsole)
tweet this snippet Tweet
this
script

Groovy JSON quotes

Published 2 months ago by daggett
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
import groovy.json.*;  
def json =[a:"aa\naa",b:'bb\tbb"bb']  
def b = new JsonBuilder(json).toPrettyString(); 
println b