Skip to main content

serialize()

Description

Serializes Event Calendar data to JSON

Usage

serialize(): object;

Returns

The method returns an object of Event Calendar data (events and calendars)

{
events: [{...}, {...}, ...],
calendars: [{...}, {...}, ...]
}

Example

// create Event Calendar
const calendar = new eventCalendar.EventCalendar("#root", {
// configuration parameters
});
// get an object of the Event Calendar data (events and calendars)
const serialized_data = calendar.serialize();
console.log(serialized_data);