Class JacksonDataFormat

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.component.jackson.AbstractJacksonDataFormat
org.apache.camel.component.jackson.JacksonDataFormat
All Implemented Interfaces:
AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.DataFormat, org.apache.camel.spi.DataFormatContentTypeHeader, org.apache.camel.spi.DataFormatName, org.apache.camel.spi.HasCamelContext, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
Direct Known Subclasses:
ListJacksonDataFormat

@Dataformat("jackson") @Metadata(excludeProperties="library,permissions,dateFormatPattern") public class JacksonDataFormat extends AbstractJacksonDataFormat
Marshal POJOs to JSON and back using Jackson.
  • Constructor Details

    • JacksonDataFormat

      public JacksonDataFormat()
      Use the default Jackson ObjectMapper and Object
    • JacksonDataFormat

      public JacksonDataFormat(Class<?> unmarshalType)
      Use the default Jackson ObjectMapper and with a custom unmarshal type
      Parameters:
      unmarshalType - the custom unmarshal type
    • JacksonDataFormat

      public JacksonDataFormat(Class<?> unmarshalType, Class<?> jsonView)
      Use the default Jackson ObjectMapper and with a custom unmarshal type and JSON view
      Parameters:
      unmarshalType - the custom unmarshal type
      jsonView - marker class to specify properties to be included during marshalling. See also
    • JacksonDataFormat

      public JacksonDataFormat(com.fasterxml.jackson.databind.ObjectMapper mapper, Class<?> unmarshalType)
      Use a custom Jackson mapper and and unmarshal type
      Parameters:
      mapper - the custom mapper
      unmarshalType - the custom unmarshal type
    • JacksonDataFormat

      public JacksonDataFormat(com.fasterxml.jackson.databind.ObjectMapper mapper, Class<?> unmarshalType, Class<?> jsonView)
      Use a custom Jackson mapper, unmarshal type and JSON view
      Parameters:
      mapper - the custom mapper
      unmarshalType - the custom unmarshal type
      jsonView - marker class to specify properties to be included during marshalling. See also
  • Method Details