Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String, String> httpHeaders,
Reader stream) throws IOException, WebApplicationException {
Class<?> componentType = getComponentType(type, genericType);
JsonXML config = getJsonXML(componentType, annotations);
List<?> list;
try {
list = readArray(componentType, config, getContext(componentType, mediaType), stream);
} catch (XMLStreamException e) {
throw new WebApplicationException(e, Status.INTERNAL_SERVER_ERROR);