-
Notifications
You must be signed in to change notification settings - Fork 479
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
[BUG]关于jsonDirect=true报错 #2347
Comments
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.48-SNAPSHOT/ 问题已修复,请帮忙用2.0.48-SNAPSHOT验证,2.0.48正式版本预计在月末发布 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
当某个字段设置了jsonDirect=true,能否为null的时候调用JSON.toJsonString不报错
@getter
@Setter
public class TestJson2 {
}
public static void main(String[] args) {
TestJson2 testJson2 = new TestJson2();
testJson2.setName("测试");
System.out.println(JSON.toJSONString(testJson2));
}
当jsonStr为null的时候报错:
期望输出结果为:{"jsonStr":null,"name":"测试"}
The text was updated successfully, but these errors were encountered: