Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import scalaz._
- trait UserName
- trait Email
- case class Person(userName: String @@ UserName, email: String @@ Email)
- val jsonString =
- """{
- |"userName": "larry", "email": "larry@seinfeld.com"
- |}
- """.stripMargin
- implicit val formats = DefaultFormats
- val p = read[Person](jsonString)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement