Class QuarkusJsonbSerializer

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<Object>, javax.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 Detail

      • QuarkusJsonbSerializer

        public QuarkusJsonbSerializer()
    • Method Detail

      • isReadable

        public boolean isReadable​(Class<?> type,
                                  Type genericType,
                                  Annotation[] annotations,
                                  javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isReadable in interface javax.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,
                                   javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isWriteable in interface javax.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,
                            javax.ws.rs.core.MediaType mediaType,
                            javax.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders,
                            OutputStream entityStream)
                     throws IOException,
                            javax.ws.rs.WebApplicationException
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<Object>
        Overrides:
        writeTo in class org.jboss.resteasy.plugins.providers.jsonb.JsonBindingProvider
        Throws:
        IOException
        javax.ws.rs.WebApplicationException
      • asyncWriteTo

        public CompletionStage<Void> asyncWriteTo​(Object t,
                                                  Class<?> type,
                                                  Type genericType,
                                                  Annotation[] annotations,
                                                  javax.ws.rs.core.MediaType mediaType,
                                                  javax.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