JSON.DEBUG

Since 1.1.0JSON

Syntax

JSON.DEBUG
  • Flags: readonly
  • ACL categories: @json, @read, @slow
  • Arity: -3

A container for commands that report on JSON documents rather than read or change them. On its own, or with a subcommand it does not know, it replies with an error that points to JSON.DEBUG HELP.

SubcommandWhat it does
JSON.DEBUG MEMORYThe size, in bytes, of each value a path matches, as compact JSON text.
JSON.DEBUG HELPLists the subcommands.

The subcommand name is not case-sensitive.

Examples

> JSON.SET d $ '{"name":"Ada"}'
OK
> JSON.DEBUG MEMORY d
(integer) 14
> JSON.DEBUG
(error) ERR unknown subcommand - try `JSON.DEBUG HELP`

Subcommands

  • JSON.DEBUG HELP: Lists the JSON.DEBUG subcommands, one line each, with their arguments and what they do.
  • JSON.DEBUG MEMORY: Reports the size, in bytes, of each value path matches in the JSON document at key, or of the whole document with no path.