add json for events and records