Last active
December 27, 2015 00:59
-
-
Save emidln/7241957 to your computer and use it in GitHub Desktop.
edn2json utility
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns edn2json.core | |
(:require clojure.data.json clojure.edn clojure.string) | |
(:gen-class)) | |
(defn all-lines [] (lazy-cat (when-let [line (read-line)] (cons line (all-lines))))) | |
(defn -main [] (clojure.data.json/write (clojure.edn/read-string (clojure.string/join " " (all-lines))) *out*)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject edn2json "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/data.json "0.2.3"]] | |
:aot :all | |
:main edn2json.core) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment