converts scheduler's data into the JSON format
var str = scheduler.toJSON();
The method requires the serialize plugin to be enabled.
Custom attributes can be configured if necessary.