Skip to content

Instantly share code, notes, and snippets.

@crazy4groovy
Forked from esycat/PrettyPrinter.groovy
Last active September 9, 2015 20:01
Show Gist options
  • Save crazy4groovy/84ac8ed61985fd4218d6 to your computer and use it in GitHub Desktop.
Save crazy4groovy/84ac8ed61985fd4218d6 to your computer and use it in GitHub Desktop.
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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment