Add a custom JSON encoder for encoding datetimes. Write a get() method for EventHandler to return all events.