Created
August 2, 2014 14:43
-
-
Save propensive/05b4867b7140955078ff to your computer and use it in GitHub Desktop.
Custom formatters in Rapture JSON
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
scala> import formatters.humanReadable | |
import formatters.humanReadable | |
scala> Json.format(json"""{ "foo": ["bar", "baz", 42] }""") | |
res0: String = | |
{ | |
"foo": [ | |
"bar", | |
"baz", | |
42 | |
] | |
} | |
// --- | |
scala> import formatters.compact | |
import formatters.compact | |
scala> Json.format(json"""{ "foo": ["bar", "baz", 42] }""") | |
res0: String = {"foo":["bar","baz",42]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment