toJson method
Implementation
Map<String, dynamic> toJson() {
final map = <String, dynamic>{
'method': method,
};
if (attribute != null) {
map['attribute'] = attribute;
}
if (values != null) {
map['values'] = values is List ? values : [values];
}
return map;
}