-
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] fastjson2 针对MutablePair序列化的结果多出字段 #608
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
针对apache common3的MutablePair类型,fastjson2会序列化出key、value序列化成字段,fastjson1不会.
针对以下对像做序列化:
System.out.println(JSON.toJSONString(new MutablePair<>("aaa","bbb")));
fastjson1 输出为:
{"aaa":"bbb"}
fastjson2输出为:
{"key":"aaa","left":"aaa","right":"bbb","value":"bbb"}
fastjson1的序列化结果是正确的。
注:已经使用最新的snapshot版本测试, 也是同样的输出 ,snapshot版本:fastjson2-2.0.11-20220803.041711-15
环境信息
The text was updated successfully, but these errors were encountered: