JsonRenderer jsonRenderer;
@WebSerializer("application/json")
public boolean serializeJson(Object result, RequestContext rc){
try {
httpWriter.setHeaders(rc, rc.getResourcePath(), false, new HttpWriterOptions().setContentType("application/json"));
if (result instanceof String){
rc.getWriter().write((String)result);
}else{
jsonRenderer.render(result, rc.getWriter());
}