This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class TestObj(name: String, msg: String) | |
def insertMulti() = Action { | |
implicit req => | |
// parse posted json objs | |
val json = req.body.asJson.getOrElse(JsNull) | |
val objs = json.as[List[JsValue]].map { | |
json => Json.reads[TestObj].reads(json).get | |
} | |
// return what we got as json string |
NewerOlder