diff options
author | Pasi Eronen <pe@iki.fi> | 2015-10-13 14:33:20 +0300 |
---|---|---|
committer | Pasi Eronen <pe@iki.fi> | 2015-10-13 14:33:20 +0300 |
commit | 0acc06900b3d0cc0720357cf72971033ca5b641a (patch) | |
tree | e08482769465344c8c9b69156921e33fa3fd013e /src/test/scala | |
parent | f185c5fb1d53f5399dbbb7229d7f7ae02971be20 (diff) | |
download | spray-json-0acc06900b3d0cc0720357cf72971033ca5b641a.tar.gz spray-json-0acc06900b3d0cc0720357cf72971033ca5b641a.tar.bz2 spray-json-0acc06900b3d0cc0720357cf72971033ca5b641a.zip |
Allow JsonParser to optionally parse multiple values (see #137)
Diffstat (limited to 'src/test/scala')
-rw-r--r-- | src/test/scala/spray/json/JsonParserSpec.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/scala/spray/json/JsonParserSpec.scala b/src/test/scala/spray/json/JsonParserSpec.scala index 0f7ae7f..e6a6899 100644 --- a/src/test/scala/spray/json/JsonParserSpec.scala +++ b/src/test/scala/spray/json/JsonParserSpec.scala @@ -107,5 +107,11 @@ class JsonParserSpec extends Specification { | ^ |""".stripMargin } + + "parse multiple values when requireEndOfInput is false" in { + val parser = new JsonParser("""{"key":1}{"key":2}""") + parser.parseJsValue(false) === JsObject("key" -> JsNumber(1)) + parser.parseJsValue(false) === JsObject("key" -> JsNumber(2)) + } } }
\ No newline at end of file |