Generating JSON for schedules