Interface DataAPISerializer
- All Known Implementing Classes:
DatabaseSerializer
,DocumentSerializer
,RowSerializer
public interface DataAPISerializer
Definition of a serializer for the Data API
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> T
convertValue
(Object bean, Class<T> clazz) Jackson deserialization.com.fasterxml.jackson.databind.ObjectMapper
Access the Jackson Mapperdefault String
Transform object as a String.default <T> T
unMarshallBean
(String body, Class<T> ref) Load body as expected object.
-
Method Details
-
getMapper
com.fasterxml.jackson.databind.ObjectMapper getMapper()Access the Jackson Mapper- Returns:
- jackson mapper
-
marshall
Transform object as a String.- Parameters:
o
- object to be serialized.- Returns:
- body as String
-
convertValue
Jackson deserialization.- Type Parameters:
T
- current type- Parameters:
bean
- current beamclazz
- target class- Returns:
- serialized
-
unMarshallBean
Load body as expected object.- Type Parameters:
T
- parameter- Parameters:
body
- response body as Stringref
- type Reference to map the result- Returns:
- expected objects
-