toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var expands = this.expands;
  var links = this.links;
  var isLastPage = this.isLastPage;
  var limit = this.limit;
  var size = this.size;
  var start = this.start;
  var values = this.values;

  final json = <String, Object?>{};
  json[r'_expands'] = expands;
  if (links != null) {
    json[r'_links'] = links.toJson();
  }
  json[r'isLastPage'] = isLastPage;
  if (limit != null) {
    json[r'limit'] = limit;
  }
  if (size != null) {
    json[r'size'] = size;
  }
  if (start != null) {
    json[r'start'] = start;
  }
  json[r'values'] = values.map((i) => i.toJson()).toList();
  return json;
}