public JSONObject getJSon() {
		// TODO Auto-generated method stub
		JSONObject js = new JSONObject();
		int week = 0, lastWeek = 0;
		int day = 0, lastDay = 0;
		JSONArray jsaDayTs = new JSONArray();
		JSONArray jsaWeekDays = new JSONArray();
		JSONArray jsaTimetableWeeks = new JSONArray();
		for (Timeslot ts : listOfTimeTable) {
			lastDay = day;
			day = ts.getDay();
			lastWeek = week;
			week = ts.getWeek();
			JSONObject jsSub = new JSONObject(ts.getSubjectTeacher().getSubject());
			JSONObject jsTchr = new JSONObject(ts.getSubjectTeacher().getTeacher());
			JSONObject jsST = new JSONObject();
			jsST.put("id", ts.getSubjectTeacher().getId());
			jsST.put("subject", jsSub);
			jsST.put("teacher", jsTchr);
			JSONObject jsTs = new JSONObject(ts);
			jsTs.put("subjectTeacher", jsST);
			jsaDayTs.put(jsTs);
			if (day != lastDay && lastDay != 0) {
				//TODO: Generate the date relevant for this day.
				// by doing start date + week * day
				jsaWeekDays.put(jsaDayTs);
				jsaDayTs = new JSONArray();
			}
			if (week != lastWeek && lastWeek != 0) {
				jsaTimetableWeeks.put(jsaWeekDays);
				jsaWeekDays = new JSONArray();
			}
		}
		if (week != 0) {
			jsaWeekDays.put(jsaDayTs);
			jsaTimetableWeeks.put(jsaWeekDays);
		}

		js.put("timetable", jsaTimetableWeeks); //only slots here
		JSONObject jsTimeTableObject = new JSONObject();
		jsTimeTableObject.put("department", department);
		jsTimeTableObject.put("section", section);
		jsTimeTableObject.put("semester",semester );
		jsTimeTableObject.put("startDate", startDate);
		
		js.put("timetableObject", jsTimeTableObject); //only department, star date etc
		return js;
	}