Package org.davidmoten.oa3.codegen.http
Interface Serializer
- All Known Implementing Classes:
DefaultSerializer
public interface Serializer
-
Method Summary
Modifier and TypeMethodDescription<T> Tdeserialize(Class<T> cls, String contentType, InputStream in) properties(Object o, String contentType) Returns the properties of object.default byte[]voidserialize(Object o, String contentType, OutputStream out)
-
Method Details
-
serialize
-
deserialize
-
properties
Returns the properties of object. If has no properties or is not an object type that supports properties then returns an empty map. In the case of JSON the map value is of an imprecise type but will serialize to JSON in an expected deterministic way using Jackson serialization (i.e the object could be an annotated Jackson object or an instance ofJsonNode).- Parameters:
o- object to get properties from, if null then returns an empty mapcontentType- content type of the object, cannot be null
-
serialize
-