GetLedgerEntriesResponse.fromJson constructor
GetLedgerEntriesResponse.fromJson(
- Map<String, dynamic> json
)
Implementation
factory GetLedgerEntriesResponse.fromJson(Map<String, dynamic> json) {
GetLedgerEntriesResponse response = GetLedgerEntriesResponse(json);
if (json['result'] != null) {
response.entries = List<LedgerEntry>.from(
json['result']['entries'].map((e) => LedgerEntry.fromJson(e)));
response.latestLedger = json['result']['latestLedger'];
} else if (json['error'] != null) {
response.error = SorobanRpcErrorResponse.fromJson(json);
}
return response;
}