Class JacksonJsonObjectMarshaller<T>
java.lang.Object
org.springframework.batch.infrastructure.item.json.JacksonJsonObjectMarshaller<T>
- Type Parameters:
T- type of objects to marshal
- All Implemented Interfaces:
JsonObjectMarshaller<T>
A json object marshaller that uses Jackson 3 to marshal an object into a json
representation.
- Since:
- 4.1
- Author:
- Mahmoud Ben Hassine
-
Constructor Summary
ConstructorsConstructorDescriptionJacksonJsonObjectMarshaller(tools.jackson.databind.json.JsonMapper jsonMapper) -
Method Summary
Modifier and TypeMethodDescriptionMarshal an object into a json representation.voidsetJsonMapper(tools.jackson.databind.json.JsonMapper jsonMapper) Set theJsonMapperto use.
-
Constructor Details
-
JacksonJsonObjectMarshaller
public JacksonJsonObjectMarshaller() -
JacksonJsonObjectMarshaller
public JacksonJsonObjectMarshaller(tools.jackson.databind.json.JsonMapper jsonMapper)
-
-
Method Details
-
setJsonMapper
public void setJsonMapper(tools.jackson.databind.json.JsonMapper jsonMapper) Set theJsonMapperto use.- Parameters:
jsonMapper- 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
-