Package org.jclouds.json.internal
Class GsonWrapper
java.lang.Object
com.google.common.collect.ForwardingObject
org.jclouds.json.internal.GsonWrapper
- All Implemented Interfaces:
Json
@Singleton
public class GsonWrapper
extends com.google.common.collect.ForwardingObject
implements Json
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.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
Deserialize the object from json.<T> T
Deserialize the generic object from json.Serialize the object into json.Serialize the generic object into json.Methods inherited from class com.google.common.collect.ForwardingObject
toString
-
Constructor Details
-
GsonWrapper
@Inject public GsonWrapper(com.google.gson.Gson gson)
-
-
Method Details
-
fromJson
Description copied from interface:Json
Deserialize the generic object from json. If the object is not a generic type, useinvalid reference
#fromJson(Object, Class)
-
fromJson
Description copied from interface:Json
Deserialize the object from json. If the object is a generic type, useinvalid reference
#fromJson(Object, Type)
-
fromJson
Description copied from interface:Json
Deserialize the generic object from json. If the object is not a generic type, useinvalid reference
#fromJson(Object, Class)
-
fromJson
Description copied from interface:Json
Deserialize the object from json. If the object is a generic type, useinvalid reference
#fromJson(Object, Type)
-
toJson
Description copied from interface:Json
Serialize the object into json. If the object is a generic type, useJson.toJson(Object, Type)
-
toJson
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
-