toJson method

Map<String, dynamic> toJson({
  1. String prefix = 'service.',
})

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 ?? {},
    };