use of com.meniga.sdk.webservices.serializers.DateTimeSerializer in project mobile-sdk-android by meniga.
the class GsonProvider method getGsonBuilder.
public static Gson getGsonBuilder() {
if (gson == null) {
GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.setFieldNamingStrategy(FieldNamingPolicy.IDENTITY);
// Register custom de/serializers.
gsonBuilder.registerTypeAdapter(DateTime.class, new DateTimeSerializer());
gsonBuilder.registerTypeAdapter(LocalDate.class, new LocalDateSerializer());
gsonBuilder.registerTypeAdapter(MenigaDecimal.class, new MenigaDecimalSerializer());
gsonBuilder.registerTypeAdapter(BudgetDate.class, new BudgetDateSerializer());
gsonBuilder.registerTypeAdapter(MenigaCategoryScore.class, new MenigaCategoryScoreSerializer());
gson = gsonBuilder.create();
}
return gson;
}
Aggregations