Skip to content

Instantly share code, notes, and snippets.

@matthewdowney
Last active August 22, 2026 22:22
Show Gist options
  • Select an option

  • Save matthewdowney/172a831c044c437d05b3ffca0207fda4 to your computer and use it in GitHub Desktop.

Select an option

Save matthewdowney/172a831c044c437d05b3ffca0207fda4 to your computer and use it in GitHub Desktop.
Boot CLI for converting EDN to JSON. E.g. $ cat ledger.edn | ./edn2json
#!/usr/bin/env boot
(set-env! :dependencies '[[org.clojure/data.json "0.2.6"]
[org.clojure/clojure "1.8.0"]])
(require '[boot.cli :refer [defclifn]])
(require '[clojure.java.io :as io])
(require '[clojure.data.json :as json])
(defclifn -main
[t transform VAL str "A literal function to transform each EDN element with before JSON-writing."]
(let [xf (eval (read-string (get *opts* :transform "identity")))]
(with-open [r (io/reader *in*)]
(->> (line-seq r)
(map (comp println json/write-str xf read-string))
(dorun)))))
;; To get this running, you need boot:
;; $ sudo bash -c "cd /usr/local/bin && curl -fsSLo boot https://github.com/boot-clj/boot-bin/releases/download/latest/boot.sh && chmod 755 boot"
;; Then you need this file saved as edn2json
;; $ chmod +x edn2json
;; $ echo "{:foo :bar}" | ./edn2json
@sasatachini

Copy link
Copy Markdown

Good afternoon to all members, I'm Justin from Victoria and enjoy sharing casual hobbies! A coworker at my logistics firm was telling me over lunch how he unwinds after long shifts by trying out live table games. Curious about how accessible these interfaces are in Canada, I spent an hour exploring GoloBet Casino on my laptop. The structured navigation menu made finding low-stakes roulette and blackjack effortless. The visual design is sharp without being cluttered with flashing pop-ups. I spent a very pleasant evening placing small bets on European roulette, and the prompt responses from their live chat support made the whole experience feel reassuring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment