toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'current_block_identifier': currentBlockIdentifier.toJson(),
'current_block_timestamp': currentBlockTimestamp,
'genesis_block_identifier': genesisBlockIdentifier.toJson(),
'peers': peers.map((e) => e.toJson()).toList(),
'oldest_block_identifier': oldestBlockIdentifier?.toJson(),
'sync_status': syncStatus?.toJson(),
}..removeWhere((key, value) => value == null);
}