presto-main/src/main/java/io/prestosql/operator/scalar/JsonPathTokenizer.java/JsonPathTokenizer/matchUnquotedSubscript
class JsonPathTokenizer:    private String matchUnquotedSubscript()
    {
        // seek until we see a special character or whitespace
        int start = index;
        while (hasNextCharacter() && isUnquotedSubscriptCharacter(peekCharacter())) {
            nextCharacter();
        }
        int end = index;

        String token = path.substring(start, end);

        // an empty unquoted token is not allowed
        if (token.isEmpty()) {
            throw invalidJsonPath();
        }

        return token;
    }