Created
February 13, 2014 16:24
-
-
Save mgdelacroix/8978379 to your computer and use it in GitHub Desktop.
Pretty printer in groovy Lists and Maps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.json.JsonBuilder | |
java.util.LinkedHashMap.metaClass.pprint = { -> new JsonBuilder(delegate).toPrettyString() } | |
java.util.ArrayList.metaClass.pprint = { -> new JsonBuilder(delegate).toPrettyString() } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment