code: def to_json(self):
      
      current_iter = None
      if self._current_iter:
        current_iter = self._current_iter.to_json()
  
      return {"key_ranges": self._key_ranges.to_json(),
              "query_spec": self._query_spec.to_json(),
              "current_iter": current_iter,
              "key_range_iter_cls": self._key_range_iter_cls.__name__,
              "name": self.__class__.__name__}
docs: Inherit doc.