toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var by = this.by;
  var when = this.when;
  var friendlyWhen = this.friendlyWhen;
  var message = this.message;
  var number = this.number;
  var minorEdit = this.minorEdit;
  var content = this.content;
  var collaborators = this.collaborators;
  var expandable = this.expandable;
  var links = this.links;
  var contentTypeModified = this.contentTypeModified;
  var confRev = this.confRev;
  var syncRev = this.syncRev;
  var syncRevSource = this.syncRevSource;

  final json = <String, Object?>{};
  if (by != null) {
    json[r'by'] = by.toJson();
  }
  json[r'when'] = when.toIso8601String();
  if (friendlyWhen != null) {
    json[r'friendlyWhen'] = friendlyWhen;
  }
  if (message != null) {
    json[r'message'] = message;
  }
  json[r'number'] = number;
  json[r'minorEdit'] = minorEdit;
  if (content != null) {
    json[r'content'] = content.toJson();
  }
  if (collaborators != null) {
    json[r'collaborators'] = collaborators.toJson();
  }
  if (expandable != null) {
    json[r'_expandable'] = expandable.toJson();
  }
  if (links != null) {
    json[r'_links'] = links.toJson();
  }
  json[r'contentTypeModified'] = contentTypeModified;
  if (confRev != null) {
    json[r'confRev'] = confRev;
  }
  if (syncRev != null) {
    json[r'syncRev'] = syncRev;
  }
  if (syncRevSource != null) {
    json[r'syncRevSource'] = syncRevSource;
  }
  return json;
}