toJson method

Map<String, dynamic> toJson()

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

Implementation

Map<String, dynamic> toJson() => <String, dynamic>{
      '@context': context,
      'type': type,
      'id': id,
      'holder': holder,
      'nonce': nonce,
      'validUntil': validUntil,
      if (label != null) 'label': label!,
      'ask': ask,
      'proof': proof.toJson(),
    };