toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var name = this.name;
  var relationData = this.relationData;
  var source = this.source;
  var target = this.target;
  var expandable = this.expandable;
  var links = this.links;

  final json = <String, Object?>{};
  json[r'name'] = name;
  if (relationData != null) {
    json[r'relationData'] = relationData.toJson();
  }
  if (source != null) {
    json[r'source'] = source;
  }
  if (target != null) {
    json[r'target'] = target;
  }
  if (expandable != null) {
    json[r'_expandable'] = expandable.toJson();
  }
  json[r'_links'] = links.toJson();
  return json;
}