18 response.setContentType(
"application/json;charset=UTF-8");
19 try (PrintWriter out = response.getWriter()) {
20 JSONObject outObject =
new JSONObject();
21 outObject.put(
"title",
"Labeling System API");
22 JSONObject versionObject =
new JSONObject();
23 versionObject.put(
"1.0", ConfigProperties.getPropertyParam(
"api") +
"/v1");
24 outObject.put(
"versions", versionObject);
26 File file =
new File(InfoResource.class.getClassLoader().getResource(
"configLabelingLink.properties").getFile());
27 SimpleDateFormat sdf =
new SimpleDateFormat(
"dd/MM/yyyy HH:mm:ss");
28 outObject.put(
"last build", sdf.format(file.lastModified()));
31 response.sendError(500, e.toString());