crazy4groovy
9/2/2013 - 8:08 AM

A simple way to pretty print nested lists and maps in Groovy.

A simple way to pretty print nested lists and maps in Groovy.

import static groovy.json.JsonOutput.*

def config = ['test': 'lalala']

println prettyPrint(toJson(config))