Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSONUtil.toBean()中将JSON数组字符串转Map对象返回config #3795

Closed
may5ThSummerWind opened this issue Nov 22, 2024 · 1 comment
Closed
Labels

Comments

@may5ThSummerWind
Copy link

版本情况

JDK版本: correto_1.8.0_432
hutool版本: 5.8.27(请确保最新尝试是否还有问题)

问题描述(包括截图)

将json数组字符串转为map对象,没有报错,返回config信息,截图如下:
image

  1. 复现代码
        String fieldMapping = """
                [{"lable":"id","value":"id"},{"lable":"name","value":"name"},{"lable":"age","value":"age"}]
                """;
        
        TypeReference<Map<String, String>> typeReference = new TypeReference<>() {
        };
        Map<String, String> fieldsMapping = JSONUtil.toBean(fieldMapping, typeReference, false);
  1. 堆栈信息
    无报错
@looly looly added the bug label Nov 24, 2024
@looly
Copy link
Member

looly commented Nov 24, 2024

5.8.34修复此问题,感谢~~

@looly looly closed this as completed Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants