-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Description
Writing to an object in a streaming fashion is a typical use case and since Jsonista aims for performance, supporting that is rather expected. As opposed to using write-value-as-string
or write-value-as-bytes
and then copying the result to an object like a writer.
Currently, this is not possible since write-value
closes the given object, hence an exception is thrown. Or maybe is it Jackson itself?
I realized this while trying to write a line-delimited JSON file.
(with-open [out (clojure.java.io/writer "/tmp/foo.json")]
(json/write-value out [:a])
(.write out (int \newline))
(json/write-value out [:b]))
Metadata
Metadata
Assignees
Labels
No labels