Comments (3)
Thank you for your speedy reply. It turns out to be somewhat painful to encode/decode a structure like:
{:_id 1 :content "blob of XML" :terms { "unigram" 1 "bi gram " 2 "a tri gram" 3 }}
... because 'keywordize' wants to convert all or none. I've fallen back to converting the string keys into composite keywords, a la { :bi_gram 2 }, which is fine for my use case.
That said, I do regard it as a bug that the default behavior of the library will silently change the layout of a hash-map of primitive structures on load/save. Looking at the code, it's not an easy thing to fix (you'd have to annotate the hash-map with metadata to know which keys should be keywordized, which is probably not worth it for such an uncommon case), but it might be wise to document this behavior prominently.
Thanks again!
from monger.
For functions where it matters there are extra parameters or options that control this behavior. The name is usually keywordize
.
from monger.
Another option is to use monger.collection/find
instead of monger.collection/find-maps
and then use monger.conversion functions however you like, with keywordize
set to true or not.
from monger.
Related Issues (20)
- Support for lookup and graphLookup HOT 1
- Execution Stats in Aggregate HOT 2
- mongo-options missing option setters
- Can't find a codec for class java.time.Instant. HOT 6
- Monger find-maps not returning any items in the collection
- Array Query returning empty result HOT 1
- Pagination returning the same keys in monger
- Message: bad query: BadValue: unknown top level operator: $ne HOT 1
- Question: Mongodb+srv HOT 2
- Type hint mismatch
- support for MongoDB 5.0 ?
- mongo-options-builder does not support uuidRepresentation option HOT 3
- Clojure 1.11 warning on `random-uuid`
- Documentation about $pushAll being deprecated not updated on website HOT 1
- Improve developer experience by avoiding "Unresolved var" warnings by clj-kondo HOT 2
- Serverless Mongo (Atlas) is not supported = A TXT record is only permitted to contain the keys [authsource, replicaset] HOT 1
- Latest version uses MongoDB java driver 3.12 which only supports MongoDB up to 4.2, which is out of support this coming April 2023.... **SOLVED** HOT 2
- Cannot delete a object HOT 1
- Freeze on `ensure-index` HOT 1
- Missing support for new version artifacts from mongodb HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monger.