application/json request bodies into POJOs via Gson so resources can declare strongly-typed parameters.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
Implements jakarta. Decline types handled by the container's built-in readers (raw JSON text / streams). |
| public Object | readFrom(Class<Object> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream)
Implements jakarta. Read a type from the |
| gson | back to summary |
|---|---|
| private Gson gson
| |
| GsonMessageBodyReader | back to summary |
|---|---|
| public GsonMessageBodyReader() | |
| isReadable | back to summary |
|---|---|
| public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) Implements jakarta. Decline types handled by the container's built-in readers (raw JSON text / streams).
Resources such as
| |
| readFrom | back to summary |
|---|---|
| public Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException Implements jakarta. Doc from jakarta. Read a type from the
In case the entity input stream is empty, the reader is expected to either return a Java representation of a
zero-length entity or throw a
| |