private static int readUnescapedJsonString(String json, StringBuilder builder, int startIndex, int len) {
        // skip the first double quote
        for (int i = startIndex + 1; i < len; i++) {
            char c = json.charAt(i);
            if (c == '\\') {
                if (++i < len) {
                    builder.append(json.charAt(i));
                }
            } else if (c == '"') {
                return i + 1;
            } else {
                builder.append(c);
            }
        }

        return len;
    }
Normalizes given directory by appending back slash if it does exist.

@param dir original directory
@return normalized directory
clickhouse-data/src/main/java/com/clickhouse/data/ClickHouseUtils.java