Advertisement
Guest User

argonaut 6.1-M5 stack overflow

a guest
Jan 13th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.37 KB | None | 0 0
  1. package msw.util
  2.  
  3. import org.joda.time.DateTime
  4. import org.joda.time.format.ISODateTimeFormat
  5.  
  6. import argonaut._
  7. import argonaut.Argonaut._
  8.  
  9. object Codecs {
  10.  
  11.   implicit def DateTimeJsonCodec: CodecJson[DateTime] = CodecJson(
  12.     dt => jString(dt.toString(ISODateTimeFormat.dateTime)),
  13.     c  => c.as[String].map(ISODateTimeFormat.dateTime.parseDateTime)
  14.   )
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement