fromJson static method
Creates a QueryEvent from a JSON representation.
Implementation
static QueryEvent fromJson(Map<String, dynamic> json) {
return QueryEvent(
id: PeerId.fromString(json['ID']),
type: QueryEventType.values[json['Type']],
responses: json['Responses'] != null
? (json['Responses'] as List).map((e) => e as AddrInfo).toList()
: null,
extra: json['Extra'],
);
}