JSON data won't load to page

I’ve just set up dhtmlxScheduler and I’ve got it working with inline data, but when I try to load data from the server nothing shows up.

jQuery(function () {
    scheduler.config.xml_date = "%Y-%m-%d %H:%i";
    scheduler.setLoadMode("week");
    scheduler.init('roster_dhtmlxscheduler', new Date(), "week");
    scheduler.config.show_loading = true;

    // var events = [
    //     {id: 1, text: "Meeting", start_date: "2017-08-11 14:00:00", end_date: "2017-08-11 17:00:00"},
    //     {id: 2, text: "Conference", start_date: "2017-08-15 12:00:00", end_date: "2017-08-18 19:00:00"},
    //     {id: 3, text: "Interview", start_date: "2017-08-24 09:00:00", end_date: "2017-08-24 10:00:00"}
    // ];
    // scheduler.parse(events, "json");

    scheduler.load("services_simple.php?module=ServiceModelRoster&action=get_scheduler_data", "json");
}); 

I just kept fiddling with it, and eventually it worked. I can’t see any difference between the code that works and the original code, so I’m dropping it.