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
- Author:
- Adrian Cole
Constructor Summary |
GsonWrapper(com.google.gson.Gson gson)
|
Methods inherited from class com.google.common.collect.ForwardingObject |
toString |
GsonWrapper
@Inject
public GsonWrapper(com.google.gson.Gson gson)
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)
- Specified by:
fromJson
in interface Json
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)
- Specified by:
fromJson
in interface Json
toJson
public String toJson(Object src)
- Description copied from interface:
Json
- Serialize the object into json. If the object is a generic type, use
Json.toJson(Object, Type)
- Specified by:
toJson
in interface Json
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, use
Json.toJson(Object, Type)
- Specified by:
toJson
in interface Json
delegate
public com.google.gson.Gson delegate()
- Specified by:
delegate
in class com.google.common.collect.ForwardingObject
Copyright © 2009-2011 jclouds. All Rights Reserved.