computeOperation method

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

Implementation

@override
List? computeOperation(Object? json) {
  if (json == null) {
    return [];
  } else if (json is Iterable) {
    return json.toList();
  } else if (json is MapEntry) {
    return [json.key, json.value];
  } else if (json is Pair) {
    return json.asList;
  } else if (json is Map) {
    return json.entries.toList();
  } else if (json is String) {
    var delimiter = getParameter(0);
    var delimiterPattern =
        delimiter != null ? RegExp(delimiter) : _LIST_DELIMITER_PATTERN;
    return parseFromInlineList(json, delimiterPattern, (s) => s);
  } else {
    return [json];
  }
}