toJson method
Serialize to a JSON map. Uses short keys to minimize payload size.
Implementation
Map<String, dynamic> toJson() => {
'v': protocolVersion,
'sender': senderNodeId,
'ts': syncTimestamp,
'nodes': nodes.map((n) => n.toJson()).toList(),
'msgs': messages.map((m) => m.toJson()).toList(),
};