playframework/Play20 — pull request #291 by srenault (2012-05-08 15:05:29+00:00)
Title: Add asEither method to JsValue

It will be good to have the exception when something wrong while converting data to JSON :

request.body.asJson.map { json =>
json.asEither[User].fold(
error => Logger.error("Failed to convert body to user : " + error.getMessage),
user => Logger.info("Welcome " + user.pseudo)
)
}.getOrElse(Logger.error("Failed to convert body to json")