CredentialSchema.fromJson constructor

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

Creates a CredentialSchema from JSON data.

The json must contain 'id' and 'type' fields.

Implementation

factory CredentialSchema.fromJson(Map<String, dynamic> json) {
  final id = getMandatoryUri(json, 'id');
  final type = getMandatoryString(json, 'type');

  return CredentialSchema(id: id, type: type);
}