/**
 * Created by Siclait on 18/7/16.
 */
import static JSONTools.JSONUtil.json;
import static spark.Spark.get;

public class JSONServiceController {

    public JSONServiceController() {
        get("/json/allurls", (request, response) -> DatabaseManager.FetchAllURL(), json());
        // more routes
    }
}

@@ -74,16 +74,49 @@
 l.json;%0A
+import static spark.Spark.after;%0A
 import s
@@ -138,16 +138,16 @@
 rk.get;%0A
-
 %0Apublic 
@@ -251,22 +251,14 @@
 (req
-ues
 t, res
-ponse
 ) -%3E
@@ -320,16 +320,89 @@
 e routes
+%0A%0A        after(%22/json/*%22,(req, res) -%3E %7Bres.type(%22application/json%22);%7D);
 %0A    %7D%0A%7D

Add Json formater filter