It seems like a DateParser format that uses Lift by default. Having revealed the code , you will see that the parser is trying to use DateParser.parse(s, format) before passing the result to the constructor for org.joda.time.DateTime .
object DateParser { def parse(s: String, format: Formats) = format.dateFormat.parse(s).map(_.getTime).getOrElse(throw new MappingException("Invalid date format " + s)) } case object DateTimeSerializer extends CustomSerializer[DateTime](format => ( { case JString(s) => new DateTime(DateParser.parse(s, format)) case JNull => null }, { case d: DateTime => JString(format.dateFormat.format(d.toDate)) } ))
The format that Lift seems to be using: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
To get around this, you can specify the correct template and add it to the serialization options, or if you prefer the JodaTime constructor to do all the work, you could create your own serializer, for example:
case object MyDateTimeSerializer extends CustomSerializer[DateTime](format => ( { case JString(s) => tryo(new DateTime(s)).openOr(throw new MappingException("Invalid date format " + s)) case JNull => null }, { case d: DateTime => JString(format.dateFormat.format(d.toDate)) } ))
Then add this to the list of formats instead of net.liftweb.json.ext.JodaTimeSerializers.all
source share