 
 (deftest test-namespaced-keywords
   (is (= "{\"foo\":\"user/bar\"}"
-         (json/encode {:foo :user/bar}))))
+         (json/encode* {:foo :user/bar})))
+  (is (= {:foo/bar "baz/eggplant"}
+         (json/decode (json/encode* {:foo/bar :baz/eggplant}) true))))
 
 (deftest test-array-coerce-fn
   (is (= {"set" #{"a" "b"} "array" ["a" "b"] "map" {"a" 1}}
          (json/decode
-          (json/encode {"set" #{"a" "b"} "array" ["a" "b"] "map" {"a" 1}}) false
+          (json/encode* {"set" #{"a" "b"} "array" ["a" "b"] "map" {"a" 1}}) false
           (fn [field-name] (if (= "set" field-name) #{} []))))))
 
 (deftest t-symbol-encoding-for-non-resolvable-symbols
   (is (= "{\"foo\":\"clojure.core/map\",\"bar\":\"clojure.core/pam\"}"
-         (json/encode {:foo 'clojure.core/map :bar 'clojure.core/pam})))
+         (json/encode* {:foo 'clojure.core/map :bar 'clojure.core/pam})))
   (is (= "{\"foo\":\"foo.bar/baz\",\"bar\":\"clojure.core/pam\"}"
-         (json/encode {:foo 'foo.bar/baz :bar 'clojure.core/pam}))))
+         (json/encode* {:foo 'foo.bar/baz :bar 'clojure.core/pam}))))
 
 (deftest t-bindable-factories
   (binding [fact/*json-factory* (fact/make-json-factory

    (is (= q (json/decode (json/encode q))))
    (is (= q (json/decode (json/encode* q))))))

(deftest t-namespaced-keywords
  (is (= {:foo/bar "baz/eggplant"}
         (json/decode (json/encode {:foo/bar :baz/eggplant}) true))))

(deftest t-pretty-print
  (is (= (str "{\n  \"foo\" : 1,\n  \"bar\" : [ {\n    \"baz\" : 2\n  }, "
              "\"quux\", [ 1, 2, 3 ] ]\n}")
         (json/encode {:foo 1 :bar [{:baz 2} :quux [1 2 3]]}
                      {:pretty true}))))

(deftest t-unicode-escaping
  (is (= "{\"foo\":\"It costs \\u00A3100\"}"
         (json/encode {:foo "It costs £100"} {:escape-non-ascii true}))))

(deftest t-custom-keyword-fn
  (is (= {:FOO "bar"} (json/decode "{\"foo\": \"bar\"}"

(deftest test-date
  (is (= {"foo" "1970-01-01T00:00:00Z"}
         (json/decode
          (json/encode*
           {:foo (Date. (long 0))}))))
  (is (= {"foo" "1970-01-01"}
         (json/decode
          (json/encode*
           {:foo (Date. (long 0))} {:date-format "yyyy-MM-dd"})))
      "encode with given date format"))

(deftest test-sql-timestamp
  (is (= {"foo" "1970-01-01T00:00:00Z"}
         (json/decode (json/encode* {:foo (Timestamp. (long 0))}))))
  (is (= {"foo" "1970-01-01"}
         (json/decode (json/encode* {:foo (Timestamp. (long 0))}
                                    {:date-format "yyyy-MM-dd"})))
      "encode with given date format"))

(deftest test-uuid
  (let [id (UUID/randomUUID)
        id-str (str id)]
    (is (= {"foo" id-str} (json/decode (json/encode* {:foo id}))))))

(deftest test-streams
  (is (= {"foo" "bar"}
