toJson method
Converts this JSON service to a JSON map.
Implementation
Map<String, dynamic> toJson({String prefix = 'service.'}) => {
'${prefix}name': name,
'${prefix}type': type,
'${prefix}port': port,
'${prefix}attributes': attributes ?? {},
};