/wro4j-extensions/src/main/java/ro/isdc/wro/extensions/http/handler/ModelAsJsonRequestHandler.java
response.setContentType( ENDPOINT_URI) ;
response.setStatus ( HttpServletResponse.SC_OK ) ;
private WroModelFactory modelFactory; @Override public void handle(final HttpServletRequest request, final HttpServletResponse response) throws IOException { ResponseHeadersConfigurer.noCache().setHeaders(response); response.setContentType(CONTENT_TYPE); <extra_id_0> newGson(request).toJson(modelFactory.create(), response.getWriter()); response.getWriter().flush(); } protected Gson newGson(final HttpServletRequest request) { return new GsonBuilder().registerTypeAdapter(Resource.class, new ResourceSerializer(getWroBasePath(request))).setPrettyPrinting().disableHtmlEscaping().create(); }