code: def to_json(self):
      
      cursor = self._cursor
      if self._query is not None:
        if isinstance(self._query, db.Query):
          cursor = self._query.cursor()
        else:
          cursor = self._query.cursor_after()
  
      if cursor is None or isinstance(cursor, basestring):
        cursor_object = False
      else:
        cursor_object = True
        cursor = cursor.to_websafe_string()
  
      return {"property_range": self._property_range.to_json(),
              "query_spec": self._query_spec.to_json(),
              "cursor": cursor,
              "ns_range": self._ns_range.to_json_object(),
              "name": self.__class__.__name__,
              "cursor_object": cursor_object}
docs: Inherit doc.