xk/JASON

Sticky additional properties

Closed this issue · 0 comments

xk commented

If you do:

o= [];
o.k= 27;
JSON.stringify(o)
JSON.stringify({})

It gives: '(function(o){\n ;\n o["k"]= 27;\n return o;\n})({});'

IOW, the (additional) properties are not reset between calls to .stringify()