Class JsonValueBodyReader

java.lang.Object
org.glassfish.json.jaxrs.JsonValueBodyReader
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<JsonValue>

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

    • JsonValueBodyReader

      public JsonValueBodyReader()
  • Method Details

    • 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<JsonValue>
    • readFrom

      public JsonValue readFrom(Class<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<JsonValue>
      Throws:
      IOException
      javax.ws.rs.WebApplicationException