hallvard
01/20/2019, 9:25 PMtoString()
on that class should return JSON.stringify(theMap)
. But that won't work since js maps have this prototype thing in them (at least I think that's why), and so there are circular references in js runtime. Has anyone got a good idea about how I could convert the map into something that JSON.stringify()
would like?Roman Artemev [JB]
01/20/2019, 9:55 PMhallvard
01/21/2019, 7:58 AMRoman Artemev [JB]
01/21/2019, 9:44 AMreplacer
parameter of JSON.stringify
to handle cyclic references using indexes or something similar and keep another object with this information.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#Parametershallvard
01/21/2019, 10:02 AM