类 MappingJacksonValue
java.lang.Object
cn.taketoday.http.converter.json.MappingJacksonValue
A simple holder for the POJO to serialize via
MappingJackson2HttpMessageConverter along with further
serialization instructions to be passed in to the converter.
On the server side this wrapper is added with a
ResponseBodyInterceptor after content negotiation selects the
converter to use but before the write.
On the client side, simply wrap the POJO and pass it in to the
RestTemplate.
- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
-
字段概要
字段 -
构造器概要
构造器构造器说明MappingJacksonValue(Object value) Create a new instance wrapping the given POJO to be serialized. -
方法概要
修饰符和类型方法说明Return the Jackson filter provider to use.Class<?>Return the serialization view to use.getValue()Return the POJO that needs to be serialized.voidsetFilters(FilterProvider filters) Set the Jackson filter provider to serialize the POJO with.voidsetSerializationView(Class<?> serializationView) Set the serialization view to serialize the POJO with.voidModify the POJO to serialize.
-
字段详细资料
-
value
-
serializationView
-
filters
-
-
构造器详细资料
-
MappingJacksonValue
Create a new instance wrapping the given POJO to be serialized.- 参数:
value- the Object to be serialized
-
-
方法详细资料
-
setValue
Modify the POJO to serialize. -
getValue
Return the POJO that needs to be serialized. -
setSerializationView
Set the serialization view to serialize the POJO with.- 另请参阅:
-
ObjectMapper.writerWithView(Class)JsonView
-
getSerializationView
Return the serialization view to use.- 另请参阅:
-
ObjectMapper.writerWithView(Class)JsonView
-
setFilters
Set the Jackson filter provider to serialize the POJO with. -
getFilters
Return the Jackson filter provider to use.- 另请参阅:
-
ObjectMapper.writer(FilterProvider)JsonFilter
-