Values

Deno KV supports any JavaScript built-in types that are supported via structured clone. The values are limited to 64k in their stored format. kview via kv-toolbox add support for three blob types. These have no hard size limit.

Important

Deno KV supports storing any JavaScript values that are cloneable, but currently doesn't support storing Web API types that are cloneable (See: denoland/deno#12067).

The support table is seen below:

Type View Add Update Notes
String
Number Deno KV stores NaN and Infinity, but currently kview cannot display them as values or allow you to set or update to those values.
Boolean
BigInt Values are entered/edited as number digits
Undefined Values can be changed to undefined but the value itself is not editable intentionally.
Null Values can be changed to null but the value itself is not editable intentionally.
Deno.KvU64 Values are entered/edited as number digits
Array 1 Values are entered/edited as JSON arrays
Map 1 Values are entered/edited as JSON array tuples of key and values
Set 1 Values are entered/edited as JSON arrays
Date Values are entered/edited as ISO strings in the format of YYYY-MM-DDTHH:mm:ss.sssZ or ±YYYYYY-MM-DDTHH:mm:ss.sssZ
RegExp Values are entered/edited as JavaScript regular expression literals (e.g. /abcd/i)
Error
EvalError
RangeError
ReferenceError
SyntaxError
TypeError
URIError
ArrayBuffer Values are added as URL safe base64 encoded strings. View is displayed as a hex byte viewer.
Int8Array Values are added as URL safe base64 encoded strings. View is displayed as a hex byte viewer.
Uint8ClampedArray Values are added as URL safe base64 encoded strings. View is displayed as a hex byte viewer.
Uint8ClampedArray Values are added as URL safe base64 encoded strings. View is displayed as a hex byte viewer.
Int16Array Values are added as URL safe base64 encoded strings. View is displayed as a hex byte viewer.
Uint16Array Values are added as URL safe base64 encoded strings. View is displayed as a hex byte viewer.
Int32Array Values are added as URL safe base64 encoded strings. View is displayed as a hex byte viewer.
Uint32Array Values are added as URL safe base64 encoded strings. View is displayed as a hex byte viewer.
Float32Array Values are added as URL safe base64 encoded strings. View is displayed as a hex byte viewer.
Float64Array Values are added as URL safe base64 encoded strings. View is displayed as a hex byte viewer.
BigInt64Array Values are added as URL safe base64 encoded strings. View is displayed as a hex byte viewer.
BigUint64Array Values are added as URL safe base64 encoded strings. View is displayed as a hex byte viewer.
Binary Data Values are added/updated by loading files. Only byte length is available as view. This is stored across multiple keys via kv-toolbox.
Blob Values are added/updated by loading files. If the type can be displayed in a browser, it will be displayed. This is stored across multiple keys via kv-toolbox.
File Values are added/updated by loading files. If the type can be displayed in a browser, it will be displayed. This is stored across multiple keys via kv-toolbox.
Objects/JSON 1 Other objects use the structured clone algorithm and added/updated by entering a JSON value.

Footnotes

  1. Objects, arrays, Maps, and Sets which contain values which cannot be serialized to JSON will not be editable. 2 3 4