-
Notifications
You must be signed in to change notification settings - Fork 1.2k
When flatten = true, Jackson2HashMapper serializes the List and deserializes it out of order #2565
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
Comments
@ainydexiaohai - Did you actually test your solution(?), because when I tried it, it did NOT work, and upon reviewing the applicable code, the Please do not post solutions 1) especially, if you have not tested the solution (don't guess), 2) you are not reasonably confident you are correct in this case, and 3) see #1. I did uncover the underlying problem and have already crafted a fix, which will appear in the next |
@jxblum Without much understanding, why didn't it work? After I rewrote flattenMap, the order after serialization and deserialization remained the same. 1、overwrite
2、Test
|
Hi,
When I tried to serialize an object containing the List attribute, I deserialized it to obtain a disordered List.
1.Problem
Test.class
User.class
result:
2.Reason
org.springframework.data.redis.hash.Jackson2HashMapper#flattenMap use HashMap to store elements.
3.Solution
Modify the storage set to LinkedHashMap.
Thanks in advance!
The text was updated successfully, but these errors were encountered: