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
dubbo 3.2.x jdk 8 spring cloud alibaba 2021.0.6 fastjson2 2.0.48
代码如下,结果是courseId 属性值丢失:
@Data public class RmsFinishCourseDTO implements Serializable { private static final long serialVersionUID = -2350411810429763923L; @RedisKey private String courseId; @RedisKey private String userId; /** * 当前学习进度 */ private String studyRate; /** * 资源id */ private String resourceId; private String providerCorpCode; private String userAgent; private String sourceId; }
RmsFinishCourseDTO course =new RmsFinishCourseDTO(); course.setCourseId("6bad799a1c894893bedade17215244a1"); course.setUserId("4b99d48f87f84868a59aa3b3ce82fd56"); byte[] bytes = JSONB.toBytes(course, JSONWriter.Feature.WriteClassName, JSONWriter.Feature.FieldBased, JSONWriter.Feature.ErrorOnNoneSerializable, JSONWriter.Feature.ReferenceDetection, JSONWriter.Feature.WriteNulls, JSONWriter.Feature.NotWriteDefaultValue, JSONWriter.Feature.NotWriteHashMapArrayListClassName, JSONWriter.Feature.WriteNameAsSymbol); RmsFinishCourseDTO result = JSONB.parseObject(bytes, RmsFinishCourseDTO.class, JSONReader.Feature.UseDefaultConstructorAsPossible, JSONReader.Feature.ErrorOnNoneSerializable, JSONReader.Feature.IgnoreAutoTypeNotMatch, JSONReader.Feature.UseNativeObject, JSONReader.Feature.FieldBased); System.out.println(result);
The text was updated successfully, but these errors were encountered:
序列化时去掉 JSONWriter.Feature.WriteNameAsSymbol 能先解决问题
Sorry, something went wrong.
fix HashCollision error, for issue #2411
bbee01a
a6bfb2c
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.49-SNAPSHOT/ 问题已经修复,请帮忙用2.0.49-SNAPSHOT版本验证,2.0.49版本预计在本周末(4月14日)前发布
https://github.com/alibaba/fastjson2/releases/tag/2.0.49 请用新版本
Successfully merging a pull request may close this issue.
dubbo 3.2.x
jdk 8
spring cloud alibaba 2021.0.6
fastjson2 2.0.48
代码如下,结果是courseId 属性值丢失:
The text was updated successfully, but these errors were encountered: