GetLatestLedgerResponse.fromJson constructor
GetLatestLedgerResponse.fromJson(- Map<String, dynamic> json
)
Implementation
factory GetLatestLedgerResponse.fromJson(Map<String, dynamic> json) {
GetLatestLedgerResponse response = GetLatestLedgerResponse(json);
if (json['result'] != null) {
response.id = json['result']['id'];
response.protocolVersion = json['result']['protocolVersion'];
response.sequence = json['result']['sequence'];
} else if (json['error'] != null) {
response.error = SorobanRpcErrorResponse.fromJson(json);
}
return response;
}