public class DefaultMarshaller extends Object implements Marshaller
Marshaller
implementation based on Gson
.Modifier and Type | Field and Description |
---|---|
static DefaultMarshaller |
INSTANCE |
Modifier | Constructor and Description |
---|---|
protected |
DefaultMarshaller() |
Modifier and Type | Method and Description |
---|---|
String |
marshal(Object requestObject)
Marshal a request object to a JSON string.
|
<T> T |
unmarshal(InputStream responseJson,
Class<T> type)
Unmarshal a JSON stream to a response object.
|
<T> T |
unmarshal(String responseJson,
Class<T> type)
Unmarshal a JSON string to a response object.
|
public static final DefaultMarshaller INSTANCE
public String marshal(Object requestObject)
Marshaller
marshal
in interface Marshaller
public <T> T unmarshal(String responseJson, Class<T> type)
Marshaller
unmarshal
in interface Marshaller
type
- The response object type.public <T> T unmarshal(InputStream responseJson, Class<T> type)
Marshaller
unmarshal
in interface Marshaller
type
- The response object type.Copyright © 2024 Worldline Global Collect. All rights reserved.