code: private void writeJsonForArchive(PrintWriter wrt, List<RecentJobEvent> jobs) {
  		
  		wrt.write("[");
  		
  		// sort jobs by time
  		Collections.sort(jobs,  new Comparator<RecentJobEvent>() {
  			@Override
  			public int compare(RecentJobEvent o1, RecentJobEvent o2) {
  				if(o1.getTimestamp() < o2.getTimestamp()) {
  					return 1;
  				} else {
  					return -1;
  				}
  			}
  			
  		});
  		
  		// Loop Jobs
  		for (int i = 0; i < jobs.size(); i++) {
  			RecentJobEvent jobEvent = jobs.get(i);
  			
  			//Serialize job to json
  			wrt.write("{");
  			wrt.write("\"jobid\": \"" + jobEvent.getJobID() + "\",");
  			wrt.write("\"jobname\": \"" + jobEvent.getJobName()+"\",");
  			wrt.write("\"status\": \""+ jobEvent.getJobStatus() + "\",");
  			wrt.write("\"time\": " + jobEvent.getTimestamp());
  			
  			wrt.write("}");
  			
  			//Write seperator between json objects
  			if(i != jobs.size() - 1) {
  				wrt.write(",");
  			}
  		}
  		wrt.write("]");
  		
  	}
docs: Writes Json with a list of currently archived jobs, sorted by time
  
  @param wrt
  @param jobs