Hi, Is there a way to configure lift-json's case class serialization so that it uses Joda DateTimes instead of java.util.Date ? I'd like to known how to make the simple following code work as expected:
import net.liftweb.json._ import org.joda.time._ case class MyCaseClass(dt: DateTime) object TestMain { def main(args: Array[String]) { implicit val formats = DefaultFormats println(Serialization.read[MyCaseClass]("""{ "dt" : "2009-10-25T12:50:37.560+01:00" }""")) println(Serialization.write(MyCaseClass(new DateTime))) } } (running this code yields: MyCaseClass(2009-10-25T12:57:03.366+01:00) <-- current date when the program was run, not the date in the code {} ) More generally, is there a way to customize lift-json's serialization mappings, in particular the types lift-json sees as primitive ? The class I'm actually interested in serializing has many fields whose type is a non-case class MyRichFloat with a single Float field. It would be really nice if I could (de)serialize these into JSON floats. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---