diff --git a/src/monger/json.clj b/src/monger/json.clj new file mode 100644 index 0000000..780d681 --- /dev/null +++ b/src/monger/json.clj @@ -0,0 +1,8 @@ +(ns monger.json + (:import (org.bson.types ObjectId)) + (:require [clojure.data.json :as json])) + +(extend-protocol json/Write-JSON + ObjectId + (write-json [^ObjectId object out escape-unicode?] + (json/write-json (.toString object) out escape-unicode?)))