Guest User

Untitled

a guest
Oct 11th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. case class User (username:String, password:String)
  2.  
  3. import net.liftweb.json._
  4. implicit val formats = DefaultFormats
  5.  
  6. val user = User("bufferine", "secret")
  7.  
  8. val userJSON = Serialization.write(user) //{"username":"bufferine", "password":"secret"}
  9.  
  10. val userBack = Serialization.read[User](userJSON)
Add Comment
Please, Sign In to add comment