简体   繁体   中英

How do I prevent an ObjectID from becoming primitive?

How do I prevent an ObjectID form becoming primitive when passing in and out of Redis?

Parsing to JSON string? Thanks!

You can either store your object as JSON string representation in simple string or use hash data structure. Node.js node_redis module offers friendlier hash commands which may be useful. There is also a library for storing objects in redis called nohm which is based on object-hash mapping library ohm .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM