diff options
-rw-r--r-- | src/main/scala/spray/json/JsonPrinter.scala | 2 | ||||
-rw-r--r-- | src/test/scala/spray/json/CompactPrinterSpec.scala | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/main/scala/spray/json/JsonPrinter.scala b/src/main/scala/spray/json/JsonPrinter.scala index e47989e..bc1e375 100644 --- a/src/main/scala/spray/json/JsonPrinter.scala +++ b/src/main/scala/spray/json/JsonPrinter.scala @@ -105,7 +105,7 @@ object JsonPrinter { } private[this] def mark(range: scala.collection.immutable.NumericRange[Char]): Unit = range foreach (mark) - mark('\u0000' to '\u0019') + mark('\u0000' to '\u001f') mark('\u007f') mark('"') mark('\\') diff --git a/src/test/scala/spray/json/CompactPrinterSpec.scala b/src/test/scala/spray/json/CompactPrinterSpec.scala index 5485d7d..79c0877 100644 --- a/src/test/scala/spray/json/CompactPrinterSpec.scala +++ b/src/test/scala/spray/json/CompactPrinterSpec.scala @@ -54,6 +54,7 @@ class CompactPrinterSpec extends Specification { CompactPrinter(JsString("\u0100")) mustEqual "\"\\u0100\"" CompactPrinter(JsString("\u0010")) mustEqual "\"\\u0010\"" CompactPrinter(JsString("\u0001")) mustEqual "\"\\u0001\"" + CompactPrinter(JsString("\u001e")) mustEqual "\"\\u001e\"" } "properly print a simple JsObject" in ( CompactPrinter(JsObject("key" -> JsNumber(42), "key2" -> JsString("value"))) |