i have data stored in redis in messagepack. How to view the data decoded in redis-cli.
I don't see any commands related to it.
redis-cli has no pretty-print functionality (yet). However, as @Ryan Vincent had suggested, you can use a Redis Lua script for that purpose. Assuming that your MessagePack-ed data is stored in the String key called foo
, this would do your bidding:
EVAL "return cmsgpack.unpack(redis.call('GET', KEYS[1]))" 1 foo
EDIT: the above assumes that the data is serialized as arrays. Returning an object will not work as Redis' protocol doesn't support that.