bestiejs / json3

A JSON polyfill. No longer maintained.
https://bestiejs.github.io/json3
Other
1.02k stars 150 forks source link

`stringify` conflates duplicates and circular references #15

Closed ghost closed 12 years ago

ghost commented 12 years ago
var S = [], N = {}
S.push(N, N)
JSON.stringify(S)
// Expected: `"[{},{}]"`. JSON 3 throws a `TypeError`.
jdalton commented 12 years ago

Nice find!

ghost commented 12 years ago

Prompted by a conversation and follow-up with @getify.