def to_dict(self, include_private=False):
        """Serializes the document to a JSON dictionary.

        Args:
            include_private (False): whether to include private fields

        Returns:
            a JSON dict
        """
        d = self._doc.to_dict(extended=True)

        if include_private:
            return d

        return {k: v for k, v in d.items() if not k.startswith("_")}
Serializes the document to a JSON dictionary.

        Args:
            include_private (False): whether to include private fields

        Returns:
            a JSON dict
        
fiftyone/core/document.py