# File json/lexer.rb, line 213
    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]|\.|-|\+/
          begin
            return(Integer(s))
          rescue ArgumentError
            # do nothing on an error, the next case should do the trick
          end
          begin
            return(Float(s))
          rescue ArgumentError
            # do nothing
          end
        end
        if (s == "")
          s = nil
        end
        return(s)
      end
    end