Delete key if it exists
Reimplement event_to_json using std::string