Create a Write that convert data to type I
, and put it at Path path
Create a Write that convert data to type I
, and put it at Path path
val w = To[JsObject] { __ => (__ \ "date").write(date("yyyy-MM-dd"")) } w.writes(new Date()) == Json.obj("date" -> "2013-10-3")
This method works fine with recursive writes
Create a Write that convert data to type I
, and put it at Path path
Create a Write that convert data to type I
, and put it at Path path
val w = To[JsObject] { __ => (__ \ "informations").write[Seq[String]]) } w.writes(Seq("foo", "bar")) == Json.obj("informations" -> Seq("foo", "bar"))
This method works fine with recursive writes