Code example for Gson

Methods: fromJson

0
  public static String toJson(GsonObject object, Class<? extends GsonObject> clazz) {
    return getInstance().toJson(object, clazz);
  } 
 
  public static <T extends GsonObject> T fromJson(String json, Class<T> clazz) {
    return getInstance().fromJson(json, clazz);
  } 
} 
Connect your IDE to all the code out there  Get Codota for Java