Data.fromJson constructor

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

Implementation

factory Data.fromJson(Map<String, dynamic> json) => Data(
      code: json['code'],
      content: json['content'],
      ownerships: json['ownerships'] == null
          ? null
          : List<Ownership>.from(
              json['ownerships'].map((dynamic x) => Ownership.fromJson(x))),
      ledger: json['ledger'] == null ? null : Ledger.fromJson(json['ledger']),
      recipients: json['recipients'] == null
          ? null
          : List<String>.from(json['recipients'].map((dynamic x) => x)),
    );