toJson method
Serializes an object
Implementation
@override
Map<String, dynamic> toJson() {
return {
'source': source.toJson(),
'target': target.toJson(),
'weight': weight,
'cardinalDir': cardinalDir,
'attributes': attributes.toJson()
};
}