We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
JDK版本: openjdk_17 hutool版本: 5.8.34
需要增加 JSONUtil 从String转换为jsonObj时进行驼峰和下划线之间的相互转换,不是转换为bean,JSONConfig中也没有这种配置属性,希望增加
` import cn.hutool.json.JSONUtil;
public class Main { public static void main(String[] args) { String camelCaseStr = "{"userAge":"123"}"; String underScoreStr = JSONUtil.camelToUnderline(camelCaseStr); System.out.println(underScoreStr); // 输出:user_age:123 } }
import cn.hutool.json.JSONUtil;
public class Main { public static void main(String[] args) { String underScoreStr = "{"user_age":"123"}"; String camelCaseStr = JSONUtil.underlineToCamel(underScoreStr); System.out.println(camelCaseStr); // 输出:userAge:123 } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
版本情况
JDK版本: openjdk_17
hutool版本: 5.8.34
问题描述(包括截图)
需要增加 JSONUtil 从String转换为jsonObj时进行驼峰和下划线之间的相互转换,不是转换为bean,JSONConfig中也没有这种配置属性,希望增加
`
import cn.hutool.json.JSONUtil;
public class Main {
public static void main(String[] args) {
String camelCaseStr = "{"userAge":"123"}";
String underScoreStr = JSONUtil.camelToUnderline(camelCaseStr);
System.out.println(underScoreStr); // 输出:user_age:123
}
}
import cn.hutool.json.JSONUtil;
public class Main {
public static void main(String[] args) {
String underScoreStr = "{"user_age":"123"}";
String camelCaseStr = JSONUtil.underlineToCamel(underScoreStr);
System.out.println(camelCaseStr); // 输出:userAge:123
}
}
The text was updated successfully, but these errors were encountered: