toJson method

Map<String, dynamic> toJson()
override

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  if (this.users != null) {
    // For the json object manually.
    Map<int, dynamic> map = Map<int, dynamic>();
    users!.forEach((key, value) {
      map[key] = value.toJson();
    });
    data['users'] = map;
  }

  if (this.plurks != null) {
    data['plurks'] = this.plurks!.map((v) => v.toJson()).toList();
  }
  data['last_offset'] = this.lastOffset;
  data['has_more'] = this.hasMore;
  data['error'] = this.error;
  data['words'] = this.words;
  data['country'] = this.country;
  data['error_text'] = this.errorText;
  data['success_text'] = this.successText;
  return data;
}