MessageConverter that can read and write JSON
using Google Gson.
com.google.gson.Gson , com.google.gson.GsonBuilder , setGson
| Access | Constructor and Description |
|---|---|
| public | |
| public | GsonMessageConverter(Gson
the Gson instance to use gson)Construct a new |
| Modifier and Type | Method and Description |
|---|---|
| protected Object | fromJson(Reader reader, Type resolvedType)
Implements abstract org. |
| protected Object | fromJson(String payload, Type resolvedType)
Implements abstract org. |
| public Gson | |
| public void | |
| protected void | toJson(Object payload, Type resolvedType, Writer writer)
Implements abstract org. |
| protected String | toJson(Object payload, Type resolvedType)
Implements abstract org. |
| gson | back to summary |
|---|---|
| private Gson gson | |
| GsonMessageConverter | back to summary |
|---|---|
| public GsonMessageConverter() Construct a new | |
| GsonMessageConverter | back to summary |
|---|---|
| public GsonMessageConverter(Gson gson) Construct a new
| |
| fromJson | back to summary |
|---|---|
| protected Object fromJson(Reader reader, Type resolvedType) Implements abstract org.
| |
| fromJson | back to summary |
|---|---|
| protected Object fromJson(String payload, Type resolvedType) Implements abstract org.
| |
| getGson | back to summary |
|---|---|
| public Gson getGson() Return the configured | |
| setGson | back to summary |
|---|---|
| public void setGson(Gson gson) Set the Setting a custom-configured
| |
| toJson | back to summary |
|---|---|
| protected void toJson(Object payload, Type resolvedType, Writer writer) Implements abstract org.
| |
| toJson | back to summary |
|---|---|
| protected String toJson(Object payload, Type resolvedType) Implements abstract org.
| |