public interface CodecContext
| Modifier and Type | Method and Description | 
|---|---|
<T> JsonCodec<T> | 
codec(Class<T> entityClass)
Returns the JSON codec for the specified entity class. 
 | 
default <T> T | 
decode(com.fasterxml.jackson.databind.JsonNode json,
      Class<T> entityClass)
Decodes the specified entity from JSON using codec
 registered to this context. 
 | 
default <T> com.fasterxml.jackson.databind.node.ObjectNode | 
encode(T entity,
      Class<T> entityClass)
Encodes the specified entity into JSON using codec
 registered to this context. 
 | 
<T> T | 
getService(Class<T> serviceClass)
Returns reference to the specified service implementation. 
 | 
com.fasterxml.jackson.databind.ObjectMapper | 
mapper()
Returns the JSON object mapper. 
 | 
com.fasterxml.jackson.databind.ObjectMapper mapper()
<T> JsonCodec<T> codec(Class<T> entityClass)
T - entity typeentityClass - entity class<T> T getService(Class<T> serviceClass)
T - service typeserviceClass - service classdefault <T> T decode(com.fasterxml.jackson.databind.JsonNode json,
                     Class<T> entityClass)
T - entity typejson - JSON to decodeentityClass - entity classdefault <T> com.fasterxml.jackson.databind.node.ObjectNode encode(T entity,
                                                                  Class<T> entityClass)
T - entity typeentity - entity to encodeentityClass - entity class