toJson method
Implementation
Map<String, dynamic> toJson() => <String, dynamic>{
'locations':
List<dynamic>.from(locations!.map((Location x) => x.toJson())),
'message': message,
'path': List<dynamic>.from(path!.map((String x) => x)),
};