jsonList method

List jsonList()

Casts data to a List<dynamic> and returns it.

Throws LuckyParseException if data is not a List.

Implementation

List<dynamic> jsonList() {
  try {
    return data as List<dynamic>;
  } catch (e) {
    throw LuckyParseException(
      'Expected List<dynamic>, got ${data.runtimeType}',
      cause: e,
    );
  }
}