toJson method
Implementation
Map<String, dynamic> toJson() => {
'num': num.toJson(),
if (type != null) 'type': type,
if (endpoints.isNotEmpty) 'endpoints': endpoints.map((e) => e.toJson()).toList(),
if (liveness != null) 'liveness': liveness,
};