copyList method
Implementation
List<dynamic> copyList(Object? source, {String? rootElementObjectError}) {
if (source == null) return <dynamic>[];
final copy = _copy(source, rootElementObjectError: rootElementObjectError);
if (copy is! List<dynamic>) {
throw FormatException('$resource must be a JSON array.');
}
return copy;
}