def nextvalue
      c = self.nextclean
      s = ""

      case c
      when /\"|\'/
	return(self.nextstring(c))
      when '{'
	self.back()
        return(Hash.new.from_json(self))
      when '['
	self.back()
	return(Array.new.from_json(self))
      else
	buf = ""
	while ((c =~ /"| |:|,|\]|\}|\/|\0/).nil?)
	  buf += c
	  c = self.nextchar()
	end
	self.back()
	s = buf.chomp
	case s
	when "true"
	  return(true)
	when "false"
	  return(false)
	when "null"
	  return(nil)
	when /^[0-9]|\.|-|\+/
          if s =~ /[.]/ then
            return Float(s)
          else
            return Integer(s)
          end
	end
	if (s == "")
          s = nil
        end
	return(s)
      end
    end
def nextvalue
      c = self.nextclean
      s = ""

      case c
      when /\"|\'/
	return(self.nextstring(c))
      when '{'
	self.back()
        return(Hash.new.from_json(self))
      when '['
	self.back()
	return(Array.new.from_json(self))
      else
	buf = ""
	while ((c =~ /"| |:|,|\]|\}|\/|\0/).nil?)
	  buf += c
	  c = self.nextchar()
	end
	self.back()
	s = buf.chomp
	case s
	when "true"
	  return(true)
	when "false"
	  return(false)
	when "null"
	  return(nil)
	when /^[0-9]|\.|-|\+/
          if s =~ /[.]/ then
            return Float(s)
          else
            return Integer(s)
          end
	end
	if (s == "")
          s = nil
        end
	return(s)
      end
    end
Reads the next value from the string.  This can return either a
 string, a FixNum, a floating point value, a JSON array, or a
 JSON object.