Permalink
Browse files

Update to jackson 2.0.0, should fix clj-json incompatibility issues

Fixes #22
  • Loading branch information...
1 parent cc4d356 commit 36f4a2a177096d57ed3edd4e39ead500f63abc98 @dakrone committed Mar 30, 2012
Showing with 16 additions and 15 deletions.
  1. +2 −2 project.clj
  2. +2 −2 src/cheshire/core.clj
  3. +3 −3 src/cheshire/custom.clj
  4. +7 −6 src/cheshire/factory.clj
  5. +1 −1 src/cheshire/generate.clj
  6. +1 −1 src/cheshire/parse.clj
View
@@ -3,8 +3,8 @@
:url "https://github.com/dakrone/cheshire"
:warn-on-reflection false
:dependencies [[org.clojure/clojure "1.3.0"]
- [org.codehaus.jackson/jackson-core-asl "1.9.5"]
- [org.codehaus.jackson/jackson-smile "1.9.5"]]
+ [com.fasterxml.jackson.core/jackson-core "2.0.0"]
+ [com.fasterxml.jackson.dataformat/jackson-dataformat-smile "2.0.0"]]
:profiles {:dev {:dependencies [[lein-marginalia "0.7.0"]
[lein-multi "1.1.0"]
[criterium "0.2.0"]
View
@@ -2,8 +2,8 @@
(:use [cheshire.factory]
[cheshire.generate :only [generate]]
[cheshire.parse :only [parse]])
- (:import (org.codehaus.jackson JsonParser JsonFactory)
- (org.codehaus.jackson.smile SmileFactory)
+ (:import (com.fasterxml.jackson.core JsonParser JsonFactory)
+ (com.fasterxml.jackson.dataformat.smile SmileFactory)
(java.io StringWriter StringReader BufferedReader BufferedWriter
ByteArrayOutputStream)))
View
@@ -7,9 +7,9 @@
(java.util Date SimpleTimeZone)
(java.text SimpleDateFormat)
(java.sql Timestamp)
- (org.codehaus.jackson.smile SmileFactory)
- (org.codehaus.jackson JsonFactory JsonGenerator
- JsonGenerationException JsonParser)))
+ (com.fasterxml.jackson.dataformat.smile SmileFactory)
+ (com.fasterxml.jackson.core JsonFactory JsonGenerator
+ JsonGenerationException JsonParser)))
;; date format rebound for custom encoding
(def ^{:dynamic true :private true} *date-format*)
View
@@ -1,8 +1,9 @@
(ns cheshire.factory
"Factories used for JSON/SMILE generation, used by both the core and
custom generators."
- (:import (org.codehaus.jackson.smile SmileFactory)
- (org.codehaus.jackson JsonFactory JsonParser$Feature)))
+ (:import (com.fasterxml.jackson.dataformat.smile SmileFactory)
+ (com.fasterxml.jackson.core JsonFactory JsonFactory$Feature
+ JsonParser$Feature)))
;; default date format used to JSON-encode Date objects
(def default-date-format "yyyy-MM-dd'T'HH:mm:ss'Z'")
@@ -40,9 +41,9 @@
(boolean (:allow-numeric-leading-zeros opts)))
(.configure JsonParser$Feature/ALLOW_NON_NUMERIC_NUMBERS
(boolean (:allow-non-numeric-numbers opts)))
- (.configure JsonParser$Feature/INTERN_FIELD_NAMES
+ (.configure JsonFactory$Feature/INTERN_FIELD_NAMES
(boolean (:intern-field-names opts)))
- (.configure JsonParser$Feature/CANONICALIZE_FIELD_NAMES
+ (.configure JsonFactory$Feature/CANONICALIZE_FIELD_NAMES
(boolean (:canonicalize-field-names opts))))))
(defn ^SmileFactory make-smile-factory
@@ -65,9 +66,9 @@
(boolean (:allow-numeric-leading-zeros opts)))
(.configure JsonParser$Feature/ALLOW_NON_NUMERIC_NUMBERS
(boolean (:allow-non-numeric-numbers opts)))
- (.configure JsonParser$Feature/INTERN_FIELD_NAMES
+ (.configure JsonFactory$Feature/INTERN_FIELD_NAMES
(boolean (:intern-field-names opts)))
- (.configure JsonParser$Feature/CANONICALIZE_FIELD_NAMES
+ (.configure JsonFactory$Feature/CANONICALIZE_FIELD_NAMES
(boolean (:canonicalize-field-names opts))))))
(defonce ^JsonFactory json-factory (make-json-factory default-factory-options))
@@ -1,5 +1,5 @@
(ns cheshire.generate
- (:import (org.codehaus.jackson JsonGenerator JsonGenerationException)
+ (:import (com.fasterxml.jackson.core JsonGenerator JsonGenerationException)
(java.util Date Map List Set SimpleTimeZone UUID)
(java.sql Timestamp)
(java.text SimpleDateFormat)
View
@@ -1,5 +1,5 @@
(ns cheshire.parse
- (:import (org.codehaus.jackson JsonParser JsonToken)))
+ (:import (com.fasterxml.jackson.core JsonParser JsonToken)))
(declare parse*)

0 comments on commit 36f4a2a

Please sign in to comment.