开发者

How do I prevent an ObjectID from becoming primitive?

开发者 https://www.devze.com 2023-04-05 10:08 出处:网络
How do I prevent an ObjectID form becoming 开发者_StackOverflow中文版primitive when passing in and out of Redis?

How do I prevent an ObjectID form becoming 开发者_StackOverflow中文版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.

0

精彩评论

暂无评论...
验证码 换一张
取 消