diff options
author | Mathias <mathias@spray.cc> | 2011-05-31 13:38:26 +0200 |
---|---|---|
committer | Mathias <mathias@spray.cc> | 2011-05-31 13:38:26 +0200 |
commit | 9044a2231c69275f175cc42d9f3637a14622bc3c (patch) | |
tree | a8f295a2078181f21b56472bfdf82029fdbe3191 /src/main/scala/cc/spray/json/PrettyPrinter.scala | |
parent | 8dea90d7c9a3ee7a370840aa62a070ca8aacbb2a (diff) | |
download | spray-json-9044a2231c69275f175cc42d9f3637a14622bc3c.tar.gz spray-json-9044a2231c69275f175cc42d9f3637a14622bc3c.tar.bz2 spray-json-9044a2231c69275f175cc42d9f3637a14622bc3c.zip |
Add trait versions of JsonPrinters for easier customization
Diffstat (limited to 'src/main/scala/cc/spray/json/PrettyPrinter.scala')
-rw-r--r-- | src/main/scala/cc/spray/json/PrettyPrinter.scala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/scala/cc/spray/json/PrettyPrinter.scala b/src/main/scala/cc/spray/json/PrettyPrinter.scala index f8e3e93..93ac0b6 100644 --- a/src/main/scala/cc/spray/json/PrettyPrinter.scala +++ b/src/main/scala/cc/spray/json/PrettyPrinter.scala @@ -22,7 +22,7 @@ import annotation.tailrec /** * A JsonPrinter that produces a nicely readable JSON source. */ -object PrettyPrinter extends JsonPrinter { +trait PrettyPrinter extends JsonPrinter { val Indent = 2 def print(x: JsValue, sb: StringBuilder) { @@ -63,5 +63,6 @@ object PrettyPrinter extends JsonPrinter { printIndent(sb, indent - 1) } } - -}
\ No newline at end of file +} + +object PrettyPrinter extends PrettyPrinter
\ No newline at end of file |