toJson method

  1. @override
Map<String, dynamic> toJson()
override

Converts the object to a JSON-serializable value.

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    'id': id,
    'format': format.name,
    'meta': meta.toJson(),
    if (claims != null) 'claims': claims?.map((c) => c.toJson()).toList(),
    if (multiple != null) 'multiple': multiple,
    if (claimSets != null) 'claimSets': claimSets,
  };
}