Esempio n. 1
0
 @Override
 public void writeTo(
     Object value,
     Class<?> type,
     Type genericType,
     Annotation[] annotations,
     MediaType mediaType,
     MultivaluedMap<String, Object> httpHeaders,
     OutputStream entityStream)
     throws IOException {
   // Workaround for a null-pointer issue that occurs when serializing entities in an
   // ExceptionMapper
   Annotation[] writeToAnnotationArray = annotations;
   if (writeToAnnotationArray == null) {
     writeToAnnotationArray = new Annotation[0];
   }
   super.writeTo(
       value, type, genericType, writeToAnnotationArray, mediaType, httpHeaders, entityStream);
 }
Esempio n. 2
0
 public JsonProvider() {
   super();
   super.setAnnotationsToUse(DEFAULT_ANNOTATIONS);
   super.setMapper(getObjectMapper());
 }