toJson method
Converts a FlowSchemaSpec instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
if (distinguisherMethod != null) {
jsonData['distinguisherMethod'] = distinguisherMethod!.toJson();
}
if (matchingPrecedence != null) {
jsonData['matchingPrecedence'] = matchingPrecedence!;
}
jsonData['priorityLevelConfiguration'] =
priorityLevelConfiguration.toJson();
if (rules != null) {
jsonData['rules'] = rules!.map((item) => item.toJson()).toList();
}
return jsonData;
}