toJson method

Map<String, Object> toJson()

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,
  };
}