pinojs / quick-format-unescaped

Solves a problem with util.format
MIT License
17 stars 13 forks source link

any circular references are problematic #1

Closed davidmarkclements closed 8 years ago

davidmarkclements commented 8 years ago

currently if an object has a circular reference the whole object is serialized as: [Circular]

This is a problem, first if the intended JSON is a key or some other stringify JSON it's going to cause an error on parse (since [Circular] isn't quoted) - second all other non-circular properties on the object are lost

we could use json-stringify-safe but this double or triples the benchmarks, so we need a faster version of json-stringify-safe

davidmarkclements commented 8 years ago

v 2.0.0 released - fixes this problem