private int checkChar(char c) {
        switch (c) {
            case '{': return 1;
            case '[': return 2;
            case '\"': return 3;
            case '-': return 4;
            case '}':
            case ']': return 6;
            default: {
                if (Character.isDigit(c)) return 4;
                if (Character.isLetter(c)) return 5;
                return 0;
            }
        }
    }