You could be generating a config file, constructing a data file or downloading/extracting data from a data source. Sometimes, it needs to be human readable to make sense of it.
(spit "file.txt" (with-out-str (clojure.pprint data)))
(with-open [wr (clojure.java.io/writer "file.edn")]
(.write wr (with-out-str (clojure.pprint/pprint data))))
Top comments (1)
Check out transit