Package com.onlinepayments.json
Interface Marshaller
- All Known Implementing Classes:
DefaultMarshaller
public interface Marshaller
Used to marshal and unmarshal Online Payments platform request and response objects to and from JSON. Thread-safe.
-
Method Summary
Modifier and TypeMethodDescriptionMarshal a request object to a JSON string.<T> Tunmarshal(InputStream responseJson, Class<T> type) Unmarshal a JSON stream to a response object.<T> TUnmarshal a JSON string to a response object.
-
Method Details
-
marshal
Marshal a request object to a JSON string. -
unmarshal
Unmarshal a JSON string to a response object.- Parameters:
type- The response object type.- Throws:
MarshallerSyntaxException- if the JSON is not a valid representation for an object of the given type
-
unmarshal
Unmarshal a JSON stream to a response object.- Parameters:
type- The response object type.- Throws:
MarshallerSyntaxException- if the JSON is not a valid representation for an object of the given type
-