Skip to content

Commit fddd9ad

Browse files
expezvemv
authored andcommitted
Replace cheshire with data.json
Fixes #306
1 parent dbbea2c commit fddd9ad

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

project.clj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
:url "http://www.eclipse.org/legal/epl-v10.html"}
66
:dependencies [[nrepl "0.8.3"]
77
^:inline-dep [http-kit "2.5.1"]
8-
^:inline-dep [cheshire "5.10.0"]
8+
^:inline-dep [org.clojure/data.json "2.3.1"]
99
^:inline-dep [org.clojure/tools.analyzer.jvm "1.1.0"]
1010
^:inline-dep [org.clojure/tools.namespace "1.1.0" :exclusions [org.clojure/tools.reader]]
1111
^:inline-dep [org.clojure/tools.reader "1.3.5"]
@@ -48,7 +48,6 @@
4848
:test {:dependencies [[print-foo "1.0.2"]]}
4949
:dev {:global-vars {*warn-on-reflection* true}
5050
:dependencies [[org.clojure/clojurescript "1.10.520"]
51-
[javax.xml.bind/jaxb-api "2.3.1"]
5251
[cider/piggieback "0.5.2"]
5352
[commons-io/commons-io "2.8.0"]]
5453
:repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}

src/refactor_nrepl/artifacts.clj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(ns refactor-nrepl.artifacts
2-
(:require [cheshire.core :as json]
2+
(:require [clojure.data.json :as json]
33
[clojure
44
[edn :as edn]
55
[string :as str]]
@@ -69,7 +69,7 @@
6969
search-suffix "%22+AND+p:%22jar%22&rows=2000&wt=json"
7070
search-url (str search-prefix group-id search-suffix)
7171
{:keys [_ _ body _]} @(http/get search-url (assoc (get-proxy-opts) :as :text))
72-
search-result (json/parse-string body true)]
72+
search-result (json/read-str body :key-fn keyword)]
7373
(map :a (-> search-result :response :docs))))
7474

7575
(defn- get-mvn-versions!
@@ -83,7 +83,7 @@
8383
artifact
8484
"%22&core=gav&rows=100&wt=json")
8585
(assoc (get-proxy-opts) :as :text))]
86-
(->> (json/parse-string body true)
86+
(->> (json/read-str body :key-fn keyword)
8787
:response
8888
:docs
8989
(map :v))))
@@ -102,7 +102,7 @@
102102
(let [{:keys [body status]} @(http/get (str "https://clojars.org/api/artifacts/"
103103
artifact))]
104104
(when (= 200 status)
105-
(map :version (:recent_versions (json/parse-string body true))))))
105+
(map :version (:recent_versions (json/read-str body :key-fn keyword))))))
106106

107107
(defn- get-artifacts-from-clojars!
108108
[]

0 commit comments

Comments
 (0)