我是新來的Clojure,並已卡住的一段時間:要求。我使用的雷音,並列入我project.clj:需要用Clojure data.json似乎並不奏效
:dependencies [[org.clojure/clojure "1.6.0"]
[http-kit "2.1.18"]
[org.clojure/data.json "0.2.6"]])
我檢查類路徑,並試圖:要求data.json,因爲它的data.json Github的頁面上說,但它說不能在路徑中找到。我試過
:require [org.httpkit.client :as http]
[clojure.string :as str]
[clojure.data.json :as json]))
隨着org.clojure.data.json和一大堆其他東西。在我的類路徑中,它說
.m2/repository/org/clojure/data.json/0.2.6/data.json-0.2.6.jar
所以我知道它在我的classpath中。
感謝
編輯
在我core.clj我的全NS腳本是
(ns myproject.core
(import [java.net URLEncoder])
(:require [org.httpkit.client :as http]
[clojure.string :as str]
[clojure.data.json :as json]))
只是爲了澄清我使用/檢出導入一個項目到另一個/。當我刪除data.json行它的工作,但不適用於它。
你在哪裏把你的'require'片段? project.clj或你的命名空間文件? –
@Piotrek我把它放在core.clj文件中。我試過其他項目,似乎無法讓他們工作。 – phlie
你列在你的DEPS'org.clojure/data.json',但在你的文件需要'cheshire.core'。 – OlegTheCat