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
简要描述您碰到的问题。
序列化 toJSONBytes 时,如果属性为 null,序列化后的 bytes 转 String 时,格式不对,多了 “,”
请填写以下信息:
如何操作可以重现该问题:
JSONObject jsonObject = JSON.parseObject( "{\"deviceId\":\"16584\",\"srcAddress\":\"109.55.156.215\",\"ssssss\":null}"); byte[] jsonBytes = JSON.toJSONBytes(jsonObject); System.out.println(new String(jsonBytes));
{"deviceId":"16584","srcAddress":"109.55.156.215"}
{"deviceId":"16584","srcAddress":"109.55.156.215",}
The text was updated successfully, but these errors were encountered:
https://github.com/alibaba/fastjson2/releases/tag/2.0.35 问题已修复,请用新版本
Sorry, something went wrong.
No branches or pull requests
问题描述
简要描述您碰到的问题。
序列化 toJSONBytes 时,如果属性为 null,序列化后的 bytes 转 String 时,格式不对,多了 “,”
环境信息
请填写以下信息:
重现步骤
如何操作可以重现该问题:
期待的正确结果
{"deviceId":"16584","srcAddress":"109.55.156.215"}
相关日志输出
{"deviceId":"16584","srcAddress":"109.55.156.215",}
附加信息
The text was updated successfully, but these errors were encountered: