How serialize an EventData object

Hi;

How do I serialize an EventData object so that I can have a JSON representation.