org.springframework.http.converter.cbor

Class MappingJackson2CborHttpMessageConverter

    • Constructor Detail

      • MappingJackson2CborHttpMessageConverter

        public MappingJackson2CborHttpMessageConverter()
        Construct a new MappingJackson2CborHttpMessageConverter using default configuration provided by Jackson2ObjectMapperBuilder.
    • Method Detail

      • setObjectMapper

        public void setObjectMapper(ObjectMapper objectMapper)
        Set the ObjectMapper for this view. If not set, a default ObjectMapper is used.

        Setting a custom-configured ObjectMapper is one way to take further control of the JSON serialization process. For example, an extended SerializerFactory can be configured that provides custom serializers for specific types. The other option for refining the serialization process is to use Jackson's provided annotations on the types to be serialized, in which case a custom-configured ObjectMapper is unnecessary. The ObjectMapper must be configured with a CBORFactory instance.

        Overrides:
        setObjectMapper in class AbstractJackson2HttpMessageConverter