+1
On May 2, 2014 11:56 AM, "Manuel Laflamme" <notifications@github.com> wrote:

> In
> nrv-extension/src/main/scala/com/wajam/nrv/extension/json/JsonApiDSL.scala:
>
> > +
> > +object JsonApiDSL {
> > +
> > +  private class DateTimeSerializer extends Serializer[DateTime] {
> > +    val isoDateFormat = ISODateTimeFormat.dateTime()
> > +    private val Class = classOf[DateTime]
> > +
> > +    override def serialize(implicit format: Formats) = {
> > +      case d: DateTime => JString(d.toString(isoDateFormat))
> > +    }
> > +
> > +    override def deserialize(implicit format: Formats) = {
> > +      case (TypeInfo(Class, _), json) => json match {
> > +        case JString(s) => isoDateFormat.parseDateTime(s)
> > +        case x => throw new MappingException("Can't convert " + x + " to DateTime")
> > +      }
>
> I think this is clearer as it is.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/wajam/nrv/pull/306/files#r12234821>
> .
>