T
- type of objects to marshalpublic class GsonJsonObjectMarshaller<T> extends java.lang.Object implements JsonObjectMarshaller<T>
Constructor and Description |
---|
GsonJsonObjectMarshaller() |
GsonJsonObjectMarshaller(com.google.gson.Gson gson) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
marshal(T item)
Marshal an object into a json representation.
|
void |
setGson(com.google.gson.Gson gson)
Set the
Gson object to use. |
public GsonJsonObjectMarshaller()
public GsonJsonObjectMarshaller(com.google.gson.Gson gson)
public void setGson(com.google.gson.Gson gson)
Gson
object to use.gson
- object to useGsonJsonObjectMarshaller(Gson)
public java.lang.String marshal(T item)
JsonObjectMarshaller
marshal
in interface JsonObjectMarshaller<T>
item
- to marshal