docs: def parse(self, f):
          '''parse a JSON stream.
          :type f: file
          :param f: stream to parse JSON from
          :type context: ctypes.POINTER
          :raises YajlError: When invalid JSON in input stream found
          '''
          self._listener.parse_start()
  
          while len(f):
              data = f.read(self._buffer_size).encode('utf-8')
              status = yajl.yajl_parse(self._handler, data, len(data))
              self._listener.parse_buf()
              if status != OK.value:
                  if status == CLIENT_CANCELLED.value:
                      if self._exc_info:
                          exc_info = self._exc_info
                          raise exc_info[0](exc_info[1]).with_traceback(exc_info[2])
                      else:
                          raise YajlError("Client probably cancelled callback")
                  else:
                      yajl.yajl_get_error.restype = c_char_p
                      error = yajl.yajl_get_error(self._handler, 1, data, len(data))
                      raise YajlError(error)
              if not data: return