code: def dump(self, stream):
          
          items = (
              ('time', self.time),
              ('inc', self.inc),
          )
          # use ordered dict to retain order
          ts = collections.OrderedDict(items)
          json.dump(dict(ts=ts), stream)
docs: Serialize self to text stream.
  
          Matches convention of mongooplog.