org.springframework.http.converter.json

Class JsonbHttpMessageConverter

    • Constructor Detail

      • JsonbHttpMessageConverter

        public JsonbHttpMessageConverter()
        Construct a new JsonbHttpMessageConverter with default configuration.
      • JsonbHttpMessageConverter

        public JsonbHttpMessageConverter(javax.json.bind.JsonbConfig config)
        Construct a new JsonbHttpMessageConverter with the given configuration.
        Parameters:
        config - the JsonbConfig for the underlying delegate
      • JsonbHttpMessageConverter

        public JsonbHttpMessageConverter(javax.json.bind.Jsonb jsonb)
        Construct a new JsonbHttpMessageConverter with the given delegate.
        Parameters:
        jsonb - the Jsonb instance to use
    • Method Detail

      • getJsonb

        public javax.json.bind.Jsonb getJsonb()
        Return the configured Jsonb instance for this converter.
      • readInternal

        protected java.lang.Object readInternal(java.lang.reflect.Type resolvedType,
                                                java.io.Reader reader)
                                         throws java.lang.Exception
        Description copied from class: AbstractJsonHttpMessageConverter
        Template method that reads the JSON-bound object from the given Reader.
        Specified by:
        readInternal in class AbstractJsonHttpMessageConverter
        Parameters:
        resolvedType - the resolved generic type
        reader - the Reader to use
        Returns:
        the JSON-bound object
        Throws:
        java.lang.Exception - in case of read/parse failures
      • writeInternal

        protected void writeInternal(java.lang.Object o,
                                     @Nullable
                                     java.lang.reflect.Type type,
                                     java.io.Writer writer)
                              throws java.lang.Exception
        Description copied from class: AbstractJsonHttpMessageConverter
        Template method that writes the JSON-bound object to the given Writer.
        Specified by:
        writeInternal in class AbstractJsonHttpMessageConverter
        Parameters:
        o - the object to write to the output message
        type - the type of object to write (may be null)
        writer - the Writer to use
        Throws:
        java.lang.Exception - in case of write failures