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))