Class JsonWriter

java.lang.Object
org.nuxeo.targetplatforms.rest.JsonWriter
All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyWriter<Object>

@Singleton @Provider @Produces({"application/json","text/plain"}) public class JsonWriter extends Object implements jakarta.ws.rs.ext.MessageBodyWriter<Object>
Since:
5.9.3
  • Field Details

    • request

      @Context protected jakarta.servlet.http.HttpServletRequest request
  • Constructor Details

    • JsonWriter

      public JsonWriter()
  • Method Details

    • isWriteable

      public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
      Specified by:
      isWriteable in interface jakarta.ws.rs.ext.MessageBodyWriter<Object>
    • getSize

      public long getSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
      Specified by:
      getSize in interface jakarta.ws.rs.ext.MessageBodyWriter<Object>
    • writeTo

      public void writeTo(Object t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException, jakarta.ws.rs.WebApplicationException
      Specified by:
      writeTo in interface jakarta.ws.rs.ext.MessageBodyWriter<Object>
      Throws:
      IOException
      jakarta.ws.rs.WebApplicationException