Class JacksonJsonAdapter

    • Constructor Detail

      • JacksonJsonAdapter

        public JacksonJsonAdapter()
    • Method Detail

      • init

        public void init​(org.apache.camel.CamelContext camelContext)
        Description copied from interface: JsonPathAdapter
        Initializes the adapter
        Specified by:
        init in interface JsonPathAdapter
        Parameters:
        camelContext - the CamelContext
      • readValue

        public Map readValue​(Object body,
                             org.apache.camel.Exchange exchange)
        Description copied from interface: JsonPathAdapter
        Attempt to read/convert the message body into a Map type
        Specified by:
        readValue in interface JsonPathAdapter
        Parameters:
        body - the message body
        exchange - the Camel exchange
        Returns:
        converted as Map or null if not possible
      • writeAsString

        public String writeAsString​(Object value,
                                    org.apache.camel.Exchange exchange)
        Description copied from interface: JsonPathAdapter
        Attempts to write the value as a JSOn String value.
        Specified by:
        writeAsString in interface JsonPathAdapter
        Parameters:
        value - the value
        exchange - the Camel exchange
        Returns:
        written as String JSON or null if not possible