public static String encodeParameters(Map<String, String> params) {
        if (params == null || params.isEmpty()) {
            return null;
        }

        StringBuilder sb = new StringBuilder();
        sb.append('[');
        params.forEach((key, value) -> {
            // {key:value},
            if (hasText(value)) {
                sb.append('{').append(key).append(':').append(value).append("},");
            }
        });
        // delete last separator ','
        if (sb.charAt(sb.length() - 1) == ',') {
            sb.deleteCharAt(sb.length() - 1);
        }
        sb.append(']');
        return sb.toString();
    }
@Test
    void testEncodeParameters() {
        Map<String, String> nullValueMap = new LinkedHashMap<>();
        nullValueMap.put("client", null);
        String str = StringUtils.encodeParameters(nullValueMap);
        assertEquals("[]", str);

        Map<String, String> blankValueMap = new LinkedHashMap<>();
        blankValueMap.put("client", " ");
        str = StringUtils.encodeParameters(nullValueMap);
        assertEquals("[]", str);

        blankValueMap = new LinkedHashMap<>();
        blankValueMap.put("client", "");
        str = StringUtils.encodeParameters(nullValueMap);
        assertEquals("[]", str);
    }