playframework/Play20 — pull request #44 by baloo (2011-12-21 01:07:19+00:00)
Title: Add test for invalid json

Putting an invalid json into custom formatter results a NullPointerException

I may be doing things wrong, then please tell me.

[info] + serialize and desarialize maps properly
[info] + serialize and deserialize
[info] + Complete JSON should create full Post object
[info] + Optional parameters in JSON should generate post w/o date
[error] ! Invalid parameters shoud be ignored
[error] NullPointerException: null (JsonSpec.scala:50)
[error] play.api.json.JsonSpec$PostFormat$.reads(JsonSpec.scala:53)
[error] play.api.json.JsonSpec$PostFormat$.reads(JsonSpec.scala:50)
[error] play.api.json.JsValue$class.as(JsValue.scala:50)
[error] play.api.json.JsObject.as(JsValue.scala:89)
[error] play.api.json.JsonSpec$$anonfun$1$$anonfun$apply$24.apply(JsonSpec.scala:89)
[error] play.api.json.JsonSpec$$anonfun$1$$anonfun$apply$24.apply(JsonSpec.scala:86)