toJson method

Map<String, Object> toJson()

Converts a PodFailurePolicy instance to JSON data.

Implementation

Map<String, Object> toJson() {
  final jsonData = <String, Object>{};

  final tempRules = rules;

  jsonData['rules'] =
      tempRules.map((e) => e.toJson()).toList(growable: false);

  return jsonData;
}