public class MappingJackson2JsonHttpMessageConverter
extends org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
HttpMessageConverter
that can read
and write JSON using Jackson 2's ObjectMapper
.
This converter can be used to bind to typed beans, or untyped HashMap
instances.
By default, this converter supports application/json
. This can be overridden by setting the
supportedMediaTypes
property.
This converter also support custom JSON views, see RESThub documentation for more details
Constructor and Description |
---|
MappingJackson2JsonHttpMessageConverter() |
Modifier and Type | Method and Description |
---|---|
void |
setJsonPrefix(String jsonPrefix) |
protected void |
writeInternal(Object object,
org.springframework.http.HttpOutputMessage outputMessage) |
canRead, canRead, canWrite, getJavaType, getJsonEncoding, getObjectMapper, read, readInternal, setObjectMapper, setPrefixJson, setPrettyPrint, supports
canRead, canWrite, getContentLength, getDefaultContentType, getSupportedMediaTypes, read, setSupportedMediaTypes, write
public MappingJackson2JsonHttpMessageConverter()
public void setJsonPrefix(String jsonPrefix)
setJsonPrefix
in class org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
protected void writeInternal(Object object, org.springframework.http.HttpOutputMessage outputMessage) throws IOException, org.springframework.http.converter.HttpMessageNotWritableException
writeInternal
in class org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
IOException
org.springframework.http.converter.HttpMessageNotWritableException
Copyright © 2009–2014. All rights reserved.