public class Jackson2SockJsMessageCodec extends AbstractSockJsMessageCodec
It customizes Jackson's default properties with the following ones:
MapperFeature.DEFAULT_VIEW_INCLUSION
is disabledDeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES
is disabledNote that Jackson's JSR-310 and Joda-Time support modules will be registered automatically when available (and when Java 8 and Joda-Time themselves are available, respectively).
Constructor and Description |
---|
Jackson2SockJsMessageCodec() |
Jackson2SockJsMessageCodec(ObjectMapper objectMapper) |
Modifier and Type | Method and Description |
---|---|
protected char[] |
applyJsonQuoting(java.lang.String content)
Apply standard JSON string quoting (see http://www.json.org/).
|
java.lang.String[] |
decode(java.lang.String content)
Decode the given SockJS message frame.
|
java.lang.String[] |
decodeInputStream(java.io.InputStream content)
Decode the given SockJS message frame.
|
encode
public Jackson2SockJsMessageCodec()
public Jackson2SockJsMessageCodec(ObjectMapper objectMapper)
@Nullable public java.lang.String[] decode(java.lang.String content) throws java.io.IOException
SockJsMessageCodec
content
- the SockJS message framenull
if nonejava.io.IOException
- if the content could not be parsed@Nullable public java.lang.String[] decodeInputStream(java.io.InputStream content) throws java.io.IOException
SockJsMessageCodec
content
- the SockJS message framenull
if nonejava.io.IOException
- if the content could not be parsedprotected char[] applyJsonQuoting(java.lang.String content)
AbstractSockJsMessageCodec
applyJsonQuoting
in class AbstractSockJsMessageCodec