Vincent escribió: > > Dear all , > > Can one store clojure keyword in MongoDB and get it back as keyword. ? > How to store Date type using clojure in MongoDB ? > using monger library. > > Monger will convert keyword keys to strings because other languages and clients may or may not have the same concept and BSON really does not have it anyway.
In Monger session stores, this is a serious limitation because libraries like Friend may rely on keywords and namespaced keywords. For that reason, there are two session stores, one for Clojure-only projects that uses Clojure reader serialization and another one for projects that may need interoperability at the data format level. See https://github.com/michaelklishin/monger/blob/master/src/clojure/monger/ring/session_store.clj So, the answer is: BSON does not have a type for keywords, store the entire map serialized with the reader in a single field. MK -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en