computeOperation method

  1. @override
String? computeOperation(
  1. Object? json
)
override

Implementation

@override
String? computeOperation(Object? json) {
  if (json == null) {
    return '';
  } else if (json is String) {
    return json;
  } else if (json is List) {
    var delimiter = getParameter(0, '')!;
    return json.join(delimiter);
  } else if (json is Map) {
    var delimiterK = getParameter(0, '');
    var delimiterV = getParameter(1, '')!;
    return json.entries
        .map((e) => '${e.key}$delimiterK${e.value}')
        .join(delimiterV);
  } else {
    return parseString(json);
  }
}