Open gajus opened 8 years ago
I recommend running this in the debugger and finding out exactly which object it is that is producing that error.
I have the same issue. It seems to have problems with ArrayMapNode Objects. The debuggers output of the object is this one:
Hrm, you shouldn't really get a raw ArrayMapNode like that - they should be contained inside an actual Map
.
Can you share a code sample which reproduces this problem please?
Thats a bit more complicated. Im basically using ReactJS with Redux to store the state of my application in an immutable map. Problem is that a lot of that happens in the background and i havent completely figured it out myself how exactly the objects look after creating them since they are created by a libary. But basically its this issue: https://github.com/rt2zz/redux-persist-transform-immutable/issues/13
I will investigate a bit further
I'm also facing this exception when serializing a simple javascript object:
[
{
"id": "hero-selection",
"name": "Hero Selection",
"panels": [
{
"id": "bgs-hero-selection-overview",
"name": "Hero Selection",
"heroOverview": []
}
]
},
{
"id": "in-game",
"name": "In Game",
"panels": [
{
"id": "bgs-next-opponent-overview",
"name": "Next opponent",
"opponentOverview": null
}
]
},
{
"id": "post-match",
"name": "Post-match stats",
"panels": [
{
"id": "bgs-post-match-stats",
"name": "Post-match stats",
"stats": null
}
]
}
]
The error is
Error serializing unrecognized object [object Object]
I am getting an error:
Here is the JSON input:
https://gist.github.com/gajus/bdd5b3d8cd0ddce24e762495d9779a75
Here is how I load it: