matches static method

bool matches(
  1. dynamic json
)

Implementation

static bool matches(dynamic json) {
  if (isMapOfStringKeys(json)) {
    var map = (json as Map).cast<String, dynamic>();

    var pageable = map['pageable'];
    if (!(pageable is Map && pageable.isNotEmpty)) return false;

    return map.containsKey('totalPages') &&
        map.containsKey('totalElements') &&
        map.containsKey('content') &&
        map.containsKey('size') &&
        pageable.containsKey('pageNumber') &&
        pageable.containsKey('offset') &&
        pageable.containsKey('pageSize');
  }
  return false;
}