Class JsonValueBodyReader

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<javax.json.JsonValue>

    @Provider
    @Consumes({"application/json","text/json","*/*"})
    public class JsonValueBodyReader
    extends Object
    implements javax.ws.rs.ext.MessageBodyReader<javax.json.JsonValue>
    Jakarta RESTful Web Services MessageBodyReader for JsonValue. This allows JsonValue to be a parameter of a resource method.
    Author:
    Jitendra Kotamraju, Blaise Doughan, Michal Gajdos
    • Constructor Detail

      • JsonValueBodyReader

        public JsonValueBodyReader()
    • Method Detail

      • isReadable

        public boolean isReadable​(Class<?> aClass,
                                  Type type,
                                  Annotation[] annotations,
                                  javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isReadable in interface javax.ws.rs.ext.MessageBodyReader<javax.json.JsonValue>
      • readFrom

        public javax.json.JsonValue readFrom​(Class<javax.json.JsonValue> jsonValueClass,
                                             Type type,
                                             Annotation[] annotations,
                                             javax.ws.rs.core.MediaType mediaType,
                                             javax.ws.rs.core.MultivaluedMap<String,​String> stringStringMultivaluedMap,
                                             InputStream inputStream)
                                      throws IOException,
                                             javax.ws.rs.WebApplicationException
        Specified by:
        readFrom in interface javax.ws.rs.ext.MessageBodyReader<javax.json.JsonValue>
        Throws:
        IOException
        javax.ws.rs.WebApplicationException