Welcome! Please see the About page for a little more info on how this works.
I need to read json line input in stdin
Example INPUT
{ "foo" : "bar" }
(read-line)
*in*
Example using jsonista:
$ clj -Sdeps '{:deps {metosin/jsonista {:mvn/version "0.2.4"}}}' Clojure 1.10.0 user=> (require '[jsonista.core :as j]) nil user=> (j/read-value (read-line)) {"foo": "bar"} {"foo" "bar"}
It depends which library you are using. I've done this in jet using cheshire:
permalink