computeTransformation method

  1. @override
dynamic computeTransformation(
  1. Object? json
)
override

Implementation

@override
dynamic computeTransformation(Object? json) {
  if (json == null) return [];

  if (nonCollectionOperation) {
    return computeOperation(json);
  } else if (json is List) {
    return json.map((e) => computeOperation(e)).toList();
  } else if (json is Map) {
    return json.map((key, value) => MapEntry(key, computeOperation(value)));
  } else {
    return computeOperation(json);
  }
}