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
fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReader12.java
Lines 213 to 215 in 7522647
这里出现了编码的错误,hashCode11LCase应该对应fieldReader11而不是fieldReader10。 这个会导致属性丢失,我这边有一段代码可以复现这个问题
String json = "{\"nonce\": \"1667236815\", \"timestamp\": \"1667236845207\", \"vin\": \"XXXXXXXXXXXX\", \"model\": \"A3\", \"sign\": \"b0a979d71f6bd54186fef5\", \"version\": \"1.0\", \"appid\": \"test\", \"productid\": \"1234\"}"; JSONObject requestJson = JSONObject.parseObject(json); Assert.assertNotNull(requestJson); log.info(JSONObject.toJSONString(requestJson)); RegisterRequest request = requestJson.to(RegisterRequest.class); log.info(JSONObject.toJSONString(request)); Assert.assertNotNull(request.getVin());
这段测试代码中,最后一个assert会失败,因为vin这个属性丢失了。
The text was updated successfully, but these errors were encountered:
补充一下,RegisterRequest中恰好有12个属性。
Sorry, something went wrong.
add testcase for issue #893 #894
47b7475
https://github.com/alibaba/fastjson2/releases/tag/2.0.18 问题已修复,请用新版本
No branches or pull requests
fastjson2/core/src/main/java/com/alibaba/fastjson2/reader/ObjectReader12.java
Lines 213 to 215 in 7522647
这里出现了编码的错误,hashCode11LCase应该对应fieldReader11而不是fieldReader10。
这个会导致属性丢失,我这边有一段代码可以复现这个问题
这段测试代码中,最后一个assert会失败,因为vin这个属性丢失了。
The text was updated successfully, but these errors were encountered: