"Serialize" type O
to type I
using the implicit Write
w
"Serialize" type O
to type I
using the implicit Write
w
To[Person2, UrlFormEncoded](Person(List("bob", "bobby"))) == Map( "name" -> Seq("bob"), "friend.name" -> Seq("bobby"))
val w = To[UrlFormEncoded] { __ => ((__ \ "email").write[Option[String]] ~ (__ \ "phone").write[String]).tupled } val v = Some("[email protected]") -> "01.23.45.67.89" w.writes(v) == Map( "email" -> Seq("[email protected]"), "phone" -> Seq("01.23.45.67.89"))