private static int readJsonConstants(String json, List<Object> value, int startIndex, int len) {
        String c = "null";
        if (json.indexOf(c, startIndex) == startIndex) {
            value.add(null);
        } else if (json.indexOf(c = "false", startIndex) == startIndex) {
            value.add(Boolean.FALSE);
        } else if (json.indexOf(c = "true", startIndex) == startIndex) {
            value.add(Boolean.TRUE);
        } else {
            throw new IllegalArgumentException(format("Expect one of 'null', 'false', 'true' but we got '%s'",
                    json.substring(startIndex, Math.min(startIndex + 5, len))));
        }

        return startIndex + c.length();
    }
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