You get access to the POJO's instance, as well as, the server's output stream in the implementation of the MessageBodyWriter interface. Now any, also binary, format can be used to serialize the POJO passed as method parameter: