Class QuarkusJsonbSerializer

java.lang.Object
org.jboss.resteasy.plugins.providers.jsonb.AbstractJsonBindingProvider
org.jboss.resteasy.plugins.providers.jsonb.JsonBindingProvider
io.quarkus.resteasy.common.runtime.jsonb.QuarkusJsonbSerializer
All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyReader<Object>, jakarta.ws.rs.ext.MessageBodyWriter<Object>, org.jboss.resteasy.spi.AsyncMessageBodyWriter<Object>

@Provider @Produces("*/*") @Consumes("*/*") @Priority(4800) public class QuarkusJsonbSerializer extends org.jboss.resteasy.plugins.providers.jsonb.JsonBindingProvider
provider that can produce JSON by default, removing the need for @Produces and @Consumes everywhere
  • Constructor Details

    • QuarkusJsonbSerializer

      public QuarkusJsonbSerializer()
  • Method Details

    • isReadable

      public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
      Specified by:
      isReadable in interface jakarta.ws.rs.ext.MessageBodyReader<Object>
      Overrides:
      isReadable in class org.jboss.resteasy.plugins.providers.jsonb.JsonBindingProvider
    • isWriteable

      public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
      Specified by:
      isWriteable in interface jakarta.ws.rs.ext.MessageBodyWriter<Object>
      Overrides:
      isWriteable in class org.jboss.resteasy.plugins.providers.jsonb.JsonBindingProvider
    • writeTo

      public void writeTo(Object t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException, jakarta.ws.rs.WebApplicationException
      Specified by:
      writeTo in interface jakarta.ws.rs.ext.MessageBodyWriter<Object>
      Overrides:
      writeTo in class org.jboss.resteasy.plugins.providers.jsonb.JsonBindingProvider
      Throws:
      IOException
      jakarta.ws.rs.WebApplicationException
    • asyncWriteTo

      public CompletionStage<Void> asyncWriteTo(Object t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, org.jboss.resteasy.spi.AsyncOutputStream entityStream)
      Specified by:
      asyncWriteTo in interface org.jboss.resteasy.spi.AsyncMessageBodyWriter<Object>
      Overrides:
      asyncWriteTo in class org.jboss.resteasy.plugins.providers.jsonb.JsonBindingProvider