Class JohnzonMessageBodyReader<T>

java.lang.Object
org.apache.johnzon.jaxrs.IgnorableTypes
org.apache.johnzon.jaxrs.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 Details

    • mapper

      private final org.apache.johnzon.mapper.Mapper mapper
  • Constructor Details

    • JohnzonMessageBodyReader

      public JohnzonMessageBodyReader()
    • JohnzonMessageBodyReader

      public JohnzonMessageBodyReader(org.apache.johnzon.mapper.Mapper mapper, Collection<String> ignoredTypes)
  • Method Details

    • 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