toJson method
A JSON representation of this reference, for DocumentReference.fromJson. The converter is not part of it.
Implementation
Map<String, Object> toJson() {
return <String, Object>{
'type': jsonType,
'referencePath': key.path.canonicalString,
};
}