Activity activity = StudentController.getCurrentActivity(student);
// Output as JSON
JSONWriter writer = new JSONWriter(resp.getWriter());
try {
writer.object().key("activity");
if(activity != null) {
writer.value(activity.toJSON());
} else {
writer.value(null);
}