spray / spray-json

A lightweight, clean and simple JSON implementation in Scala
Apache License 2.0
974 stars 190 forks source link

Invalid JSON is successfully parsed #167

Closed theon closed 9 years ago

theon commented 9 years ago

The following invalid JSON gets successfully parsed by ignoring the invalid trailing content. Is this expected? I feel like this should fail, or at least fail when a strict mode is enabled.

scala> import spray.json._
import spray.json._

scala> """ ["a"],["b"] """.parseJson
res0: spray.json.JsValue = ["a"]
sirthias commented 9 years ago

Yes, thanks for reporting!

sirthias commented 9 years ago

One question: it seems that this might be a duplicate of #137, which was already fixed in 1.3.2. Could you verify?

theon commented 9 years ago

Ah yes. Sorry missed that one!