Correctly Serialize Maps
See original GitHub issueHappy to open a PR on this myself, want to clear with maintainers:
Map objects are not displaying any key-value pair contents. For example, our Redux store actually contains a very large Map object with a lot of data, but none of it shows up here:
Whereas when we console.log
the data it does in fact serialize correctly and display. I would be happy to open a PR on this and write the serializer myself – this makes Redux dev tools much less useful when I use the Map object.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:16 (7 by maintainers)
Top Results From Across the Web
java - Serializing and deserializing a map with key as string
The serialization form of java.util.HashMap doesn't serialize the buckets themselves, and the hash code is not part of the persisted state.
Read more >Map<String, Object> does not serialize propperly
I'm trying to save an object that contains a Map<String,Object>. The values of the Map can be of different types. Serialization does not...
Read more >Serialization in Java - DigitalOcean
Deserialization is the process of converting Object stream to actual Java Object to be used in our program. Serialization in Java seems very ......
Read more >How to Serialize and Deserialize Objects in Java?Tutorial
Once we restore the object we print its state to compare values before serialization. This will give you a clear idea of how...
Read more >Serialization (C#) - Microsoft Learn
JSON serialization serializes the public properties of an object into a string, byte array, or stream that conforms to the RFC 8259 JSON ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Turns out that there is an option to enable serializing non-JSON objects (serializing
Map
s is not enabled by default). See theserialize
option (setoptions
totrue
) in order to enable serializingMap
s for the Redux DevTools extension.Let me know if that works for you. Closing for now as I believe this is resolved.
@rob2d It is true that the former maintainer of this project has moved on (see https://github.com/reduxjs/redux-devtools/issues/502). Up until this past week I’ve been too busy to dedicate any time to this, but starting last week I now have quite a bit of free time for the foreseeable future and hope to be an active maintainer for this project. I’ve just started to get familiar with the code in this library and am working on multiple PRs at the moment.
All the write privileges for this repo and corresponding packages have been given to @timdorr, but I also understand that he is quite busy. Hopefully he has enough time to review/merge my PRs and publish them somewhat frequently. If that ends up falling through then I’ll end up forking the project and releasing the packages under a different name, but that would be unfortunate and hopefully unnecessary.
Regarding correctly serializing
Map
s andSet
s in the Redux DevTools: @erezcohen said they used to work in the past. If that’s true, then there’s probably already a system in place to serialize and deserialize them correctly, and there just happens to be a bug or something else got messed up. As I become acquainted with the code, I’ll see if I run across any code that is already meant to handleMap
s andSet
s and take it from there.