toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var version = this.version;
  var title = this.title;
  var type = this.type;
  var status = this.status;
  var space = this.space;
  var ancestors = this.ancestors;

  final json = <String, Object?>{};
  json[r'version'] = version.toJson();
  json[r'title'] = title;
  json[r'type'] = type.value;
  if (status != null) {
    json[r'status'] = status.value;
  }
  if (space != null) {
    json[r'space'] = space.toJson();
  }
  json[r'ancestors'] = ancestors.map((i) => i.toJson()).toList();
  return json;
}