Map<String, dynamic> toJson() { return { 'network_identifier': networkIdentifier.toJson(), 'block_identifier': blockIdentifier.toJson(), }..removeWhere((key, value) => value == null); }