How do I implement a custom JodaTime\'s DateTime serializer/deserializer for JSON? I\'m inclined to use the Play Framework\'s JSON library (2.1.1). There is a default DateTi
I use Play 2.3.7 and define in companion object implicit reads/writes with string pattern:
case class User(username:String, birthday:org.joda.time.DateTime)
object User {
implicit val yourJodaDateReads = Reads.jodaDateReads("yyyy-MM-dd'T'HH:mm:ss'Z'")
implicit val yourJodaDateWrites = Writes.jodaDateWrites("yyyy-MM-dd'T'HH:mm:ss'Z'")
implicit val userFormat = Json.format[User]
}