JSON

JSON documents stored natively, read and changed in place by JSONPath: nested values, arrays and objects, numbers and strings.

26 commands in KiviDB 1.1.2. Every command.

  • JSON.ARRAPPEND: Appends values, each JSON text, to each array path matches.
  • JSON.ARRINDEX: Returns the index of the first element equal to value, JSON text, in each array path matches, from start to stop.
  • JSON.ARRINSERT: Inserts values, each JSON text, before index in each array path matches.
  • JSON.ARRLEN: Returns the length of each array path matches.
  • JSON.ARRPOP: Removes and returns an element from each array path matches: the last one, or the one at index.
  • JSON.ARRTRIM: Keeps only the elements from start to stop, both included, in each array path matches.
  • JSON.CLEAR: Empties each array and object path matches, and sets each number it matches to 0.
  • JSON.DEBUG: Reports on JSON documents.
    • JSON.DEBUG HELP: Lists the JSON.DEBUG subcommands and what each does.
    • JSON.DEBUG MEMORY: Returns the approximate size, in bytes, of each value path matches in the JSON document at key; of the whole document with no path.
  • JSON.DEL: Deletes the values path matches in the JSON document at key.
  • JSON.FORGET: Another name for JSON.DEL.
  • JSON.GET: Returns values from the JSON document at key, as JSON text.
  • JSON.MERGE: Merges value into each value path matches, as an RFC 7396 merge patch: members are merged into objects, null deletes a member, and anything else replaces.
  • JSON.MGET: Evaluates path in the JSON documents at several keys.
  • JSON.MSET: JSON.SET for several key-path-value triples at once.
  • JSON.NUMINCRBY: Adds number to each number path matches.
  • JSON.NUMMULTBY: Multiplies each number path matches by number, with the same replies as JSON.NUMINCRBY.
  • JSON.OBJKEYS: Returns the member names of each object path matches, in the order they were added.
  • JSON.OBJLEN: Returns the number of members of each object path matches.
  • JSON.RESP: Returns each value path matches in RESP rather than JSON text: null as nil, booleans as true and false, integers as integers, other numbers and strings as bulk strings, an array as [ followed by its…
  • JSON.SET: Sets the value at path in the JSON document at key to value, which is JSON text.
  • JSON.STRAPPEND: Appends a JSON string to each string path matches.
  • JSON.STRLEN: Returns the length of each string path matches; nil for a match that is not a string.
  • JSON.TOGGLE: Flips each boolean path matches.
  • JSON.TYPE: Returns the type of each value path matches: object, array, string, integer, number, boolean or null.