toJson method

Map<String, dynamic> toJson()

Serialize to a JSON-encodable map, omitting absent members.

Implementation

Map<String, dynamic> toJson() => <String, dynamic>{
      'id': id,
      'applicantDid': applicantDid,
      'vp': vp,
      if (vpClaims != null) 'vpClaims': vpClaims!,
      'submittedAt': submittedAt,
      'status': status.value,
      if (policyDecision != null) 'policyDecision': policyDecision!,
      if (decision != null) 'decision': decision!.toJson(),
      if (registryConsent != null) 'registryConsent': registryConsent!,
      if (extensions != null) 'extensions': extensions!,
      if (attributes != null)
        'attributes': attributes!.map((e) => e.toJson()).toList(),
    };