Spring Integration

org.springframework.integration.support.json
Class Jackson2JsonMessageParser

java.lang.Object
  extended by org.springframework.integration.support.json.Jackson2JsonMessageParser
All Implemented Interfaces:
JsonInboundMessageMapper.JsonMessageParser<com.fasterxml.jackson.core.JsonParser>

public class Jackson2JsonMessageParser
extends java.lang.Object

JsonInboundMessageMapper.JsonMessageParser implementation that parses JSON messages and builds a Message with the specified payload type from provided JsonInboundMessageMapper. Uses Jackson 2 JSON-processor (@link https://github.com/FasterXML).

Since:
3.0
Author:
Artem Bilan, Gary Russell

Constructor Summary
Jackson2JsonMessageParser()
           
 
Method Summary
protected  com.fasterxml.jackson.core.JsonParser createJsonParser(java.lang.String jsonMessage)
           
 Message<?> doInParser(JsonInboundMessageMapper messageMapper, java.lang.String jsonMessage)
           
protected  Message<?> parseWithHeaders(com.fasterxml.jackson.core.JsonParser parser, java.lang.String jsonMessage)
           
protected  java.lang.Object readHeader(P parser, java.lang.String headerName, java.lang.String jsonMessage)
           
protected  java.lang.Object readPayload(P parser, java.lang.String jsonMessage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jackson2JsonMessageParser

public Jackson2JsonMessageParser()
Method Detail

createJsonParser

protected com.fasterxml.jackson.core.JsonParser createJsonParser(java.lang.String jsonMessage)
                                                          throws java.lang.Exception
Throws:
java.lang.Exception

parseWithHeaders

protected Message<?> parseWithHeaders(com.fasterxml.jackson.core.JsonParser parser,
                                      java.lang.String jsonMessage)
                               throws java.lang.Exception
Throws:
java.lang.Exception

doInParser

public Message<?> doInParser(JsonInboundMessageMapper messageMapper,
                             java.lang.String jsonMessage)
                      throws java.lang.Exception
Specified by:
doInParser in interface JsonInboundMessageMapper.JsonMessageParser<P>
Throws:
java.lang.Exception

readPayload

protected java.lang.Object readPayload(P parser,
                                       java.lang.String jsonMessage)
                                throws java.lang.Exception
Throws:
java.lang.Exception

readHeader

protected java.lang.Object readHeader(P parser,
                                      java.lang.String headerName,
                                      java.lang.String jsonMessage)
                               throws java.lang.Exception
Throws:
java.lang.Exception

Spring Integration