def to_json(self):
        """Convert Data Collection to a dictionary."""
        return {
            'header': self.header.to_json(),
            'values': self._values,
            'datetimes': self.datetimes,
            'validated_a_period': self._validated_a_period
        }
Convert Data Collection to a dictionary.