Browse files

Use a *much* faster "satisfies?" alternative

  • Loading branch information...
1 parent 6f1854c commit 18a1b4a68da6ee830c993f64b4a26c353328ab1b @dakrone committed Dec 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/cheshire/generate.clj
2 src/cheshire/generate.clj
@@ -82,7 +82,7 @@
(defn generate [^JsonGenerator jg obj ^String date-format ^Exception ex]
(nil? obj) (.writeNull ^JsonGenerator jg)
- (:to-json (find-protocol-impl JSONable obj)) (#'to-json obj jg)
+ (get (:impls JSONable) (class obj)) (#'to-json obj jg)
(i? IPersistentCollection obj) (condp instance? obj
(generate-map jg obj date-format ex)

0 comments on commit 18a1b4a

Please sign in to comment.