diff options
author | Pasi Eronen <pe@iki.fi> | 2015-11-02 16:29:55 +0200 |
---|---|---|
committer | Pasi Eronen <pe@iki.fi> | 2015-11-02 16:29:55 +0200 |
commit | 6db24d692854339c41b483cc24c0b42cff255736 (patch) | |
tree | c8a02a3dc44a0bc07ba0b8bb662f9698727a5a32 /src/main | |
parent | 0acc06900b3d0cc0720357cf72971033ca5b641a (diff) | |
download | spray-json-6db24d692854339c41b483cc24c0b42cff255736.tar.gz spray-json-6db24d692854339c41b483cc24c0b42cff255736.tar.bz2 spray-json-6db24d692854339c41b483cc24c0b42cff255736.zip |
Rename JsonParser parameter requireEndOfInput to allowTrailingInput, add test case
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/scala/spray/json/JsonParser.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/scala/spray/json/JsonParser.scala b/src/main/scala/spray/json/JsonParser.scala index cdbedb1..0f371cf 100644 --- a/src/main/scala/spray/json/JsonParser.scala +++ b/src/main/scala/spray/json/JsonParser.scala @@ -39,12 +39,12 @@ class JsonParser(input: ParserInput) { private[this] var jsValue: JsValue = _ def parseJsValue(): JsValue = - parseJsValue(true) + parseJsValue(false) - def parseJsValue(requireEndOfInput: Boolean): JsValue = { + def parseJsValue(allowTrailingInput: Boolean): JsValue = { ws() `value`() - if (requireEndOfInput) + if (!allowTrailingInput) require(EOI) jsValue } |