Class JohnzonMessageBodyReader<T>

  • All Implemented Interfaces:
    jakarta.ws.rs.ext.MessageBodyReader<T>

    @Consumes({"application/json","*/json","*/*+json","*/x-json","*/javascript","*/x-javascript"})
    public class JohnzonMessageBodyReader<T>
    extends IgnorableTypes
    implements jakarta.ws.rs.ext.MessageBodyReader<T>
    • Field Detail

      • mapper

        private final Mapper mapper
    • Constructor Detail

      • JohnzonMessageBodyReader

        public JohnzonMessageBodyReader()
      • JohnzonMessageBodyReader

        public JohnzonMessageBodyReader​(Mapper mapper,
                                        Collection<String> ignoredTypes)
    • Method Detail

      • isReadable

        public boolean isReadable​(Class<?> rawType,
                                  Type genericType,
                                  Annotation[] annotations,
                                  jakarta.ws.rs.core.MediaType mediaType)
        Specified by:
        isReadable in interface jakarta.ws.rs.ext.MessageBodyReader<T>
      • readFrom

        public T readFrom​(Class<T> rawType,
                          Type genericType,
                          Annotation[] annotations,
                          jakarta.ws.rs.core.MediaType mediaType,
                          jakarta.ws.rs.core.MultivaluedMap<String,​String> httpHeaders,
                          InputStream entityStream)
                   throws IOException
        Specified by:
        readFrom in interface jakarta.ws.rs.ext.MessageBodyReader<T>
        Throws:
        IOException