JSON.DEBUG MEMORY
JSON.DEBUG MEMORY key [path]
Report a value's memory usage in bytes
keyis key to parse.
pathis JSONPath to specify. Default is root $.
JSON.DEBUG MEMORY returns an integer reply specified as the value size in bytes. For more information about replies, see Redis serialization protocol specification.
Create a JSON document.
127.0.0.1:6379> JSON.SET item:2 $ '{"name":"Wireless earbuds","description":"Wireless Bluetooth in-ear headphones","connection":{"wireless":true,"type":"Bluetooth"},"price":64.99,"stock":17,"colors":["black","white"], "max_level":[80, 100, 120]}'
OKGet the values' memory usage in bytes.
127.0.0.1:6379> JSON.DEBUG MEMORY item:2
(integer) 253
© 2006–2022 Salvatore Sanfilippo
Licensed under the Creative Commons Attribution-ShareAlike License 4.0.
https://redis.io/commands/json.debug-memory/