Add to_json method for departures
Fix encoding issues