Skip to content
Browse files

Use cheshire for json instead of contrib.

  • Loading branch information...
1 parent 69f184b commit e17ca60176b71e16fef023aeae1c753df06e95ba @technomancy technomancy committed
Showing with 5 additions and 5 deletions.
  1. +1 −0 project.clj
  2. +4 −5 src/clojars/web/search.clj
View
1 project.clj
@@ -9,6 +9,7 @@
[compojure "0.5.2"]
[ring/ring-jetty-adapter "0.3.1"]
[hiccup "0.3.0"]
+ [cheshire "2.0.2"]
[org.clojars.ato/nailgun "0.7.1"]
[org.xerial/sqlite-jdbc "3.6.17"]
[org.apache.commons/commons-email "1.2"]]
View
9 src/clojars/web/search.clj
@@ -3,9 +3,8 @@
clojars.db
hiccup.core
hiccup.page-helpers
- hiccup.form-helpers
- clojure.contrib.json
-))
+ hiccup.form-helpers)
+ (:require [cheshire.core :as json]))
(defn format-date [s]
(.format (java.text.SimpleDateFormat. "yyyy-MM-dd") s))
@@ -23,8 +22,8 @@
(defn json-gen [query]
(let [results (filter #(not (nil? (:jar_name %)))
(search-jars query))]
- (json-str {:count (count results)
- :results (map jar->json results)})))
+ (json/generate-string {:count (count results)
+ :results (map jar->json results)})))
(defn json-search [query]
{:status 200,

0 comments on commit e17ca60

Please sign in to comment.
Something went wrong with that request. Please try again.