def dict(self):
        """
        Return dict representation of the current Connection, keeping only data
        that could be exported to JSON (convention: attributes which do not
        start with _).
        """
        return {k: v for k, v in self.__dict__.items() if not k.startswith('_')}