added more event types, improved handling of strings when creating the json message