Back to project page mvp-notes.
The source code is released under:
Apache License
If you think the Android project mvp-notes listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.corneliudascalu.mvpnotes.util; /*from w w w .j a v a 2 s .c om*/ import com.google.gson.JsonElement; import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; import org.joda.time.DateTime; import java.lang.reflect.Type; /** * @author Corneliu Dascalu <corneliu.dascalu@gmail.com> */ public class DateTimeSerializer implements JsonSerializer<DateTime> { @Override public JsonElement serialize(DateTime src, Type typeOfSrc, JsonSerializationContext context) { return new JsonPrimitive(src.toString()); } }