toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var contexts = this.contexts;
  var data = this.data;
  var description = this.description;
  var name = this.name;

  final json = <String, Object?>{};
  json[r'contexts'] = contexts.map((i) => i.toJson()).toList();
  if (data != null) {
    json[r'data'] = data;
  }
  if (description != null) {
    json[r'description'] = description;
  }
  json[r'name'] = name;
  return json;
}