fromJson method
Implementation
@override
ValidatorWeight fromJson(Map<String, dynamic> json) {
late ClPublicKey publicKey;
if (json.containsKey("validator")) {
publicKey = ClPublicKeyJsonConverter().fromJson(json["validator"]);
} else if (json.containsKey("public_key")) {
publicKey = ClPublicKeyJsonConverter().fromJson(json["public_key"]);
}
return ValidatorWeight(
publicKey,
json['weight'] == null ? null : BigInt.parse(json['weight']),
);
}