From a9597798725fb40d6088e9517cc15805813d60c5 Mon Sep 17 00:00:00 2001 From: gered Date: Sat, 29 Mar 2014 08:52:33 -0400 Subject: [PATCH] safer way of reading the config file --- src/blarg/util.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/blarg/util.clj b/src/blarg/util.clj index b76e99e..3c4f193 100644 --- a/src/blarg/util.clj +++ b/src/blarg/util.clj @@ -1,6 +1,7 @@ (ns blarg.util (:require [clojure.string :as str] [clojure.java.io :as io] + [clojure.edn :as edn] [clojure.stacktrace :refer [print-stack-trace]] [markdown.core :as md] [noir.io] @@ -11,7 +12,7 @@ "loads a file from the resources directory, parses and returns it as clojure" [file] (with-open [r (PushbackReader. (io/reader (io/resource file)))] - (read r))) + (edn/read r))) (defn load-json "loads a file from the resources directory, parses it as JSON and returns it