Class JacksonJsonObjectMarshaller<T>
java.lang.Object
org.springframework.batch.item.json.JacksonJsonObjectMarshaller<T>
- Type Parameters:
T- type of objects to marshal
- All Implemented Interfaces:
JsonObjectMarshaller<T>
A json object marshaller that uses
Jackson to marshal an object into a
json representation.
- Since:
- 4.1
- Author:
- Mahmoud Ben Hassine
-
Constructor Summary
ConstructorsConstructorDescriptionJacksonJsonObjectMarshaller(com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionMarshal an object into a json representation.voidsetObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Set theObjectMapperto use.
-
Constructor Details
-
JacksonJsonObjectMarshaller
public JacksonJsonObjectMarshaller() -
JacksonJsonObjectMarshaller
public JacksonJsonObjectMarshaller(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
setObjectMapper
public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Set theObjectMapperto use.- Parameters:
objectMapper- to use- See Also:
-
marshal
Description copied from interface:JsonObjectMarshallerMarshal an object into a json representation.- Specified by:
marshalin interfaceJsonObjectMarshaller<T>- Parameters:
item- to marshal- Returns:
- json representation fo the object
-