Welcome! Please see the About page for a little more info on how this works.

0 votes
in data.json by

If serializing a large data structure, the write-object function will retain head references, causing memory pressure.

The problem code looks to me like a typo:

https://github.com/clojure/data.json/blob/master/src/main/clojure/clojure/data/json.clj#L322

calling seq on the parameter of the function, rather than the loop variable. That keeps the parameter in-scope during the recursion.

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/DJSON-26 (reported by alex+import)
...