Example usage for Java org.springframework.web.servlet.view.json MappingJackson2JsonView fields, constructors, methods, implement or subclass
The text is from its open source code.
MappingJackson2JsonView() Construct a new MappingJackson2JsonView using default configuration provided by Jackson2ObjectMapperBuilder and setting the content type to application/json . | |
MappingJackson2JsonView(ObjectMapper objectMapper) Construct a new MappingJackson2JsonView using the provided ObjectMapper and setting the content type to application/json . |
ObjectMapper | getObjectMapper() Return the ObjectMapper for this view. |
void | setExtractValueFromSingleKeyModel(boolean extractValueFromSingleKeyModel) Set whether to serialize models containing a single attribute as a map or whether to extract the single value from the model and serialize it directly. |
void | setObjectMapper(ObjectMapper objectMapper) Set the ObjectMapper for this view. |
void | setPrettyPrint(boolean prettyPrint) Whether to use the default pretty printer when writing the output. |