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