Skip to content

Instantly share code, notes, and snippets.

@propensive
Created August 2, 2014 14:43
Show Gist options
  • Save propensive/05b4867b7140955078ff to your computer and use it in GitHub Desktop.
Save propensive/05b4867b7140955078ff to your computer and use it in GitHub Desktop.
Custom formatters in Rapture JSON
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