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 ancestors = this.ancestors;
  var body = this.body;

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