PartyActivityV1.fromJson constructor

PartyActivityV1.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory PartyActivityV1.fromJson(Map<String, dynamic> json) {
  var items = json['ref_parents'];
  return PartyActivityV1(
      id: json['id'],
      org_id: json['org_id'],
      time: DateTime.tryParse(json['time']),
      type: json['type'],
      party:
          json['party'] != null ? ReferenceV1.fromJson(json['party']) : null,
      ref_item: json['ref_item'] != null
          ? ReferenceV1.fromJson(json['ref_item'])
          : null,
      ref_parents: List<ReferenceV1>.from(
          items.map((itemsJson) => ReferenceV1.fromJson(itemsJson))),
      ref_party: json['ref_party'] != null
          ? ReferenceV1.fromJson(json['ref_party'])
          : null,
      details: json['details'] != null
          ? StringValueMap.fromJson(json['details'])
          : null);
}