toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'id'] = id;
  if (rev != null) {
    json[r'rev'] = rev;
  }
  if (deletionDate != null) {
    json[r'deletionDate'] = deletionDate;
  }
  if (context != null) {
    json[r'context'] = context;
  }
  if (type != null) {
    json[r'type'] = type;
  }
  if (code != null) {
    json[r'code'] = code;
  }
  if (version != null) {
    json[r'version'] = version;
  }
  json[r'label'] = label;
  if (author != null) {
    json[r'author'] = author;
  }
  json[r'regions'] = regions.toList();
  json[r'periodicity'] = periodicity.toList();
  if (level != null) {
    json[r'level'] = level;
  }
  json[r'links'] = links.toList();
  json[r'qualifiedLinks'] = qualifiedLinks;
  json[r'flags'] = flags.toList();
  json[r'searchTerms'] = searchTerms.map((k, v) => MapEntry(k, v.toList()));
  if (data != null) {
    json[r'data'] = data;
  }
  json[r'appendices'] = appendices;
  json[r'disabled'] = disabled;
  return json;
}