Report a value's memory usage in bytes
key
is key to parse.
path
is 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.
Report a value's memory usage in bytes
Create a JSON document.
{{< highlight bash >}} 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]}' OK {{< / highlight >}}
Get the values' memory usage in bytes.
{{< highlight bash >}} 127.0.0.1:6379> JSON.DEBUG MEMORY item:2 (integer) 253 {{< / highlight >}}
JSON.SET
| JSON.ARRLEN