make the HTML-output of the REST servlet JSON-compatible.