toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var expands = this.expands;
  var links = this.links;
  var attachments = this.attachments;
  var author = this.author;
  var body = this.body;
  var created = this.created;
  var id = this.id;
  var public = this.public;
  var renderedBody = this.renderedBody;

  final json = <String, Object?>{};
  json[r'_expands'] = expands;
  if (links != null) {
    json[r'_links'] = links.toJson();
  }
  if (attachments != null) {
    json[r'attachments'] = attachments.toJson();
  }
  if (author != null) {
    json[r'author'] = author.toJson();
  }
  if (body != null) {
    json[r'body'] = body;
  }
  if (created != null) {
    json[r'created'] = created.toJson();
  }
  if (id != null) {
    json[r'id'] = id;
  }
  json[r'public'] = public;
  if (renderedBody != null) {
    json[r'renderedBody'] = renderedBody.toJson();
  }
  return json;
}