scala> val s = """{"a":"B","c:789}"""
s: String = {"a":"B","c:789}
scala> s.parseJson
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2367)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:587)
at java.lang.StringBuilder.append(StringBuilder.java:214)
at spray.json.JsonParser.appendSB(JsonParser.scala:179)
at spray.json.JsonParser.char(JsonParser.scala:138)
at spray.json.JsonParser.string(JsonParser.scala:129)
at spray.json.JsonParser.members$1(JsonParser.scala:76)
at spray.json.JsonParser.object(JsonParser.scala:84)
at spray.json.JsonParser.value(JsonParser.scala:59)
at spray.json.JsonParser.parseJsValue(JsonParser.scala:43)
at spray.json.JsonParser$.apply(JsonParser.scala:28)
at spray.json.PimpedString.parseJson(package.scala:45)
... 18 elided
Note that the quote from the second field name (c), is not closed correctly. However I would expect a spray.json.JsonParser.ParsingException or a spray.json.DeserializationException instead.
This seems to happen in 1.3.0.
Note that the quote from the second field name (c), is not closed correctly. However I would expect a
spray.json.JsonParser.ParsingException
or aspray.json.DeserializationException
instead.