Examples of GsonDateTimeDeserializer


Examples of com.elastisys.scale.commons.json.typeadapters.GsonDateTimeDeserializer

   */
  public static <T> T toObject(JsonElement jsonObject, Class<T> type) {
    Preconditions.checkNotNull(jsonObject, "null jsonObject not allowed");
    Preconditions.checkNotNull(type, "null type not allowed");
    Gson gson = new GsonBuilder().registerTypeAdapter(DateTime.class,
        new GsonDateTimeDeserializer()).create();
    return type.cast(gson.fromJson(jsonObject, type));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.