code: def to_json_type(self):
          
          document_dict = self._json_safe(self._document)
          self._remove_keys(document_dict, self._private_fields)
          return document_dict
docs: Return a dictionary for the document with values converted to JSON safe
          types.