top | item 11257600

(no title)

jedschmidt | 10 years ago

Absolutely. The downside of running a full-blown eval() exists in JSON too, it's just that the eval() there is taking place in the reviver function, which requires a lot more coordination than a self-contained file.

As far as efficiency, I'd think for most uses the issue would be on the JSON.parse end. In this case, lave might be more efficient, since JSON reviving often ends up creating temporary objects that need to GC'ed after reification.

discuss

order

javajosh|10 years ago

Interesting. I'd like to whip up some simple benchmarks tomorrow, and I'll share what I find.

Also, it would be interesting to support other data-types, such as the ones that come with Immutable.js. That would be slick.