toJson method
Convert the message to a JSON map
Implementation
@override
Map<String, dynamic> toJson() {
return {
'type': type.value,
'documentId': documentId,
'timestamp': timestamp,
if (versionVector != null)
'versionVector': _encodeVersionVector(versionVector!),
};
}