Returns this object in JSON format.
Map<String, dynamic> toJson() => { 'from': from, 'to': to, 'directive': directive.toString().split('.').last.toLowerCase() };