Fix event and swipe to_json