Can we combine these two into a single function called to_json (Event, Format) that sort of matches from_json/2 below.  The Format's are different, but I don't like the mismatched nature of the calls.  You might even have a default of typed so you can have a to_json/1.  That way a test like E == from_json(to_json(E)) should be possible.