@Singleton public class GsonWrapper extends com.google.common.collect.ForwardingObject implements Json
Constructor and Description |
---|
GsonWrapper(com.google.gson.Gson gson) |
Modifier and Type | Method and Description |
---|---|
com.google.gson.Gson |
delegate() |
<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.
|
@Inject public GsonWrapper(com.google.gson.Gson gson)
public <T> T fromJson(String json, Type type)
Json
#fromJson(Object, Class)
public <T> T fromJson(String json, Class<T> classOfT)
Json
#fromJson(Object, Type)
public String toJson(Object src)
Json
Json.toJson(Object, Type)
public String toJson(Object src, Type type)
Json
Json.toJson(Object, Type)
public com.google.gson.Gson delegate()
delegate
in class com.google.common.collect.ForwardingObject
Copyright © 2009-2012 jclouds. All Rights Reserved.