toJson method
Convert the message to a JSON map
Implementation
@override
Map<String, dynamic> toJson() {
return {
'type': type.value,
'documentId': documentId,
'snapshot': snapshot != null ? _encodeSnapshot(snapshot!) : null,
'changes': changes?.map(_encodeChange).toList(),
'sessionId': sessionId,
'versionVector': _encodeVersionVector(versionVector),
};
}