Skip to content

Instantly share code, notes, and snippets.

@pieter-duplessis
Forked from esycat/PrettyPrinter.groovy
Created April 22, 2020 05:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pieter-duplessis/335672893760158b60880048e328f7a5 to your computer and use it in GitHub Desktop.
Save pieter-duplessis/335672893760158b60880048e328f7a5 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