extractList method

  1. @override
List extractList(
  1. dynamic value,
  2. String errMsg
)
override

Extracts and validates a List from dynamic value. Throws FormatException if value is not a List.

Implementation

@override
List<dynamic> extractList(dynamic value, String errMsg) {
  if (value is! List) {
    throw FormatException(
      "[JsonConverter] expected list, got ${value.runtimeType}: $errMsg",
    );
  }
  return value;
}