def read_json_string(skipContext = false)
      # This string's characters must match up with the elements in escape_char_vals.
      # I don't have '/' on this list even though it appears on www.json.org --
      # it is not in the RFC -> it is. See RFC 4627
      escape_chars = "\"\\/bfnrt"

      # The elements of this array must match up with the sequence of characters in
      # escape_chars
      escape_char_vals = [
        "\"", "\\", "\/", "\b", "\f", "\n", "\r", "\t",
      ]

      if !skipContext
        @context.read(@reader)
      end
      read_json_syntax_char(@@kJSONStringDelimiter)
      ch = ""
      str = ""
      while (true)
        ch = @reader.read
        if (ch == @@kJSONStringDelimiter)
          break
        end
        if (ch == @@kJSONBackslash)
          ch = @reader.read
          if (ch == 'u')
            ch = read_json_escape_char
          else
            pos = escape_chars.index(ch);
            if (pos.nil?) # not found
              raise ProtocolException.new(ProtocolException::INVALID_DATA, "Expected control char, got \'#{ch}\'.")
            end
            ch = escape_char_vals[pos]
          end
        end
        str += ch
      end
      return str
    end
def read_json_string(skipContext = false)
      # This string's characters must match up with the elements in escape_char_vals.
      # I don't have '/' on this list even though it appears on www.json.org --
      # it is not in the RFC -> it is. See RFC 4627
      escape_chars = "\"\\/bfnrt"

      # The elements of this array must match up with the sequence of characters in
      # escape_chars
      escape_char_vals = [
        "\"", "\\", "\/", "\b", "\f", "\n", "\r", "\t",
      ]

      if !skipContext
        @context.read(@reader)
      end
      read_json_syntax_char(@@kJSONStringDelimiter)
      ch = ""
      str = ""
      while (true)
        ch = @reader.read
        if (ch == @@kJSONStringDelimiter)
          break
        end
        if (ch == @@kJSONBackslash)
          ch = @reader.read
          if (ch == 'u')
            ch = read_json_escape_char
          else
            pos = escape_chars.index(ch);
            if (pos.nil?) # not found
              raise ProtocolException.new(ProtocolException::INVALID_DATA, "Expected control char, got \'#{ch}\'.")
            end
            ch = escape_char_vals[pos]
          end
        end
        str += ch
      end
      return str
    end
Decodes a JSON string, including unescaping, and returns the string via str