Package org.jclouds.json.internal
Class GsonWrapper
- java.lang.Object
-
- com.google.common.collect.ForwardingObject
-
- org.jclouds.json.internal.GsonWrapper
-
-
Constructor Summary
Constructors Constructor Description GsonWrapper(com.google.gson.Gson gson)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gson.Gson
delegate()
<T> T
fromJson(InputStream json, Charset charset, Class<T> classOfT)
Deserialize the object from json.<T> T
fromJson(InputStream json, Charset charset, Type type)
Deserialize the generic object from json.<T> T
fromJson(String json, Class<T> classOfT)
Deserialize the object from json.<T> T
fromJson(String json, Type type)
Deserialize the generic object from json.String
toJson(Object src)
Serialize the object into json.String
toJson(Object src, Type type)
Serialize the generic object into json.
-
-
-
Method Detail
-
fromJson
public <T> T fromJson(String json, Type type)
Description copied from interface:Json
Deserialize the generic object from json. If the object is not a generic type, use#fromJson(Object, Class)
-
fromJson
public <T> T fromJson(String json, Class<T> classOfT)
Description copied from interface:Json
Deserialize the object from json. If the object is a generic type, use#fromJson(Object, Type)
-
fromJson
public <T> T fromJson(InputStream json, Charset charset, Type type)
Description copied from interface:Json
Deserialize the generic object from json. If the object is not a generic type, use#fromJson(Object, Class)
-
fromJson
public <T> T fromJson(InputStream json, Charset charset, Class<T> classOfT)
Description copied from interface:Json
Deserialize the object from json. If the object is a generic type, use#fromJson(Object, Type)
-
toJson
public String toJson(Object src)
Description copied from interface:Json
Serialize the object into json. If the object is a generic type, useJson.toJson(Object, Type)
-
toJson
public String toJson(Object src, Type type)
Description copied from interface:Json
Serialize the generic object into json. If the object is not a generic, useJson.toJson(Object, Type)
-
delegate
public com.google.gson.Gson delegate()
- Specified by:
delegate
in classcom.google.common.collect.ForwardingObject
-
-