类 GsonJsonObjectMarshaller<T>
- java.lang.Object
- org.springframework.batch.item.json.GsonJsonObjectMarshaller<T>
- 类型参数:
T
- type of objects to marshal
- 所有已实现的接口:
JsonObjectMarshaller<T>
public class GsonJsonObjectMarshaller<T> extends java.lang.Object implements JsonObjectMarshaller<T>
A json object marshaller that uses Google Gson to marshal an object into a json representation.- 从以下版本开始:
- 4.1
- 作者:
- Mahmoud Ben Hassine
构造器概要
构造器 构造器 说明 GsonJsonObjectMarshaller()
构造器详细资料
GsonJsonObjectMarshaller
public GsonJsonObjectMarshaller()
方法详细资料
setGson
public void setGson(com.google.gson.Gson gson)
Set theGson
object to use.- 参数:
gson
- object to use
marshal
public java.lang.String marshal(T item)
从接口复制的说明:JsonObjectMarshaller
Marshal an object into a json representation.- 指定者:
marshal
在接口中JsonObjectMarshaller<T>
- 参数:
item
- to marshal- 返回:
- json representation fo the object