diff --git a/src/main/java/be/jaud/Main.java b/src/main/java/be/jaud/Main.java index 51620db..3fb79cc 100644 --- a/src/main/java/be/jaud/Main.java +++ b/src/main/java/be/jaud/Main.java @@ -67,13 +67,10 @@ public class Main { } private static String createOutput(){ - JSONArray dat = new JSONArray(); + JSONObject dat = new JSONObject(); Date updatetime = new Date(time); - JSONObject displays = new JSONObject(); + dat.put("interval",conf.getInt("refreshTime")*1000); JSONArray display = new JSONArray(); - JSONObject refresh = new JSONObject(); - refresh.put("interval",conf.getInt("refreshTime")); - dat.put(refresh); JSONObject monitor1 = new JSONObject(); monitor1.put("label","Zug"); JSONArray layout = new JSONArray(); @@ -133,8 +130,7 @@ public class Main { int zug4 = data.get(conf.getString("monitors.monitor4.DepartureTime")); makeLabel(monitor5, zug4); display.put(monitor5); - displays.put("displays", display); - dat.put(displays); + dat.put("displays",display); return dat.toString(); }