メインコンテンツまでスキップ

JSON module

Valkey JSON stores structured JSON documents and lets you read or change values by JSONPath. Use it when your application needs to work with nested fields or update part of a document.

Confirm the module configuration and required commands with your account support representative when arranging deployment with Momento Cache.

Features​

  • Store nested objects, arrays, and scalar values as native JSON.
  • Select values with JSONPath, including wildcards, array selections, and filter expressions.
  • Update individual values, increment numbers, and append array elements without replacing the entire document.

Key commands​

Use these Valkey JSON commands to identify the operations your application needs.

CommandPurpose
JSON.SETSet a document or replace a value at a JSONPath.
JSON.GETRead serialized JSON from one or more paths.
JSON.MGETRead a path from multiple document keys.
JSON.DELDelete values at a path; the root path deletes the key.
JSON.NUMINCRBYIncrement numeric values at a path.
JSON.ARRAPPENDAppend values to arrays at a path.
JSON.ARRLENRead array lengths at a path.
JSON.TYPERead the JSON value types at a path.

Further reading​