crazy4groovy
9/9/2015 - 8:01 PM

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