CustomClaimValue.fromJson constructor

CustomClaimValue.fromJson(
  1. Object? json
)

Implementation

factory CustomClaimValue.fromJson(Object? json) {
  if (json is String) {
    return CustomClaimValueString(json);
  }
  if (json is num) {
    return CustomClaimValueNumber(json.toDouble());
  }
  if (json is bool) {
    return CustomClaimValueBoolean(json);
  }
  throw FormatException('Value does not match CustomClaimValue: $json');
}