Permalink
Browse files

Bump dependencies to use built-in JSON.

  • Loading branch information...
1 parent 20e2483 commit bc8de84e65092d69dbb01c133c0ee84a8f8b9c48 @rnewman committed May 14, 2010
Showing with 7 additions and 15 deletions.
  1. +1 −1 .clojure
  2. +2 −4 project.clj
  3. +4 −10 src/com/twinql/clojure/mql.clj
View
2 .clojure
@@ -1 +1 @@
-src:/opt/clojure/clojure.jar:/opt/clojure-contrib/clojure-contrib.jar:lib/apache-mime4j-0.6.jar:lib/clj-apache-http.jar:lib/clojure-json.jar:lib/commons-codec-1.3.jar:lib/commons-logging-1.1.1.jar:lib/httpclient-4.0.1.jar:lib/httpcore-4.0.1.jar:lib/httpmime-4.0.1.jar
+src:lib/apache-mime4j-0.6.jar:lib/clj-apache-http-2.1.0.jar:lib/clojure-1.2.0-master-20100507.230258-69.jar:lib/clojure-contrib-1.2.0-20100507.230536-107.jar:lib/commons-codec-1.3.jar:lib/commons-logging-1.1.1.jar:lib/httpclient-4.0.1.jar:lib/httpcore-4.0.1.jar:lib/httpmime-4.0.1.jar
View
6 project.clj
@@ -1,9 +1,7 @@
(defproject com.twinql.clojure/mql
- "1.0.6"
+ "1.0.7"
:description "Freebase MQL client library."
:dependencies [[org.clojure/clojure "1.2.0-master-SNAPSHOT"]
[org.clojure/clojure-contrib "1.2.0-SNAPSHOT"]
- [org.danlarkin/clojure-json "1.1-SNAPSHOT"]
- ; [org.clojars.rnewman/clojure-json "1.2.2-SNAPSHOT-clojure120"]
- [com.twinql.clojure/clj-apache-http "2.0.2"]])
+ [com.twinql.clojure/clj-apache-http "2.1.0"]])
View
14 src/com/twinql/clojure/mql.clj
@@ -7,8 +7,8 @@
(org.apache.http.client CookieStore)
(org.apache.http.impl.client AbstractHttpClient))
(:require
- [com.twinql.clojure.http :as http]
- [org.danlarkin.json :as json]))
+ [clojure.contrib.json :as json]
+ [com.twinql.clojure.http :as http]))
;;;
;;; API URIs.
@@ -50,12 +50,6 @@
;;; This is bound by with-login.
(def *cookie-store* nil)
-;;; It's very convenient to always receive bodies as parsed JSON.
-
-(defmethod http/entity-as :json
- [entity as status]
- (json/decode-from-reader (http/entity-as entity :reader status)))
-
;;;
;;; Generic utilities.
;;;
@@ -271,7 +265,7 @@
[code content]
;; Have to do this every time so we can rewrite the
;; cursor part.
- (let [query (alter-map-by q json/encode-to-str)]
+ (let [query (alter-map-by q json/json-str)]
(http/get *mql-read*
:headers headers
:parameters parameters
@@ -351,7 +345,7 @@
http-options]} (apply hash-map args)
query (non-nil-values
- {"q" (json/encode-to-str query)
+ {"q" (json/json-str query)
"limit" limit
"start" start
"jsonp" jsonp})]

0 comments on commit bc8de84

Please sign in to comment.