in src/main/java/org/apache/sling/launchpad/testservices/events/EventsCounterImpl.java [81:96]
protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)
throws ServletException, IOException {
response.setContentType("application/json");
response.setCharacterEncoding("UTF-8");
try {
final JSONWriter w = new JSONWriter(response.getWriter());
w.object();
for (Map.Entry<String, AtomicInteger> entry : counters.entrySet()) {
w.key(entry.getKey()).value(entry.getValue());
}
w.endObject();
w.flush();
} catch (IOException je) {
throw (IOException) new IOException("JSONException in doGet").initCause(je);
}
}