Skip to content

InputStream question #59

Open
Open
@archaic

Description

Hello, I am looking to migrate from clojure.data.json to jsonista, but am unsure how to
process an input stream of JSON encoded maps. Note I can't preprocess the input stream
to be a vector of maps either.

In clojure.data.json I do this:

(loop [data []]
    (if-let [datom 
             (try (json/read reader)
                  (catch java.io.EOFException _)
                  (catch Exception Ex
                    (log/error Ex)))]
      (recur (conj data
                   datom))
      data))

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions