Skip to main content
Version: 3.27.2

KVStoreEntry.json()

The json() method of the KVStoreEntry interface takes a KVStoreEntry stream and reads it to completion. It returns a promise which resolves with the result of parsing the body text as JSON.

Note that despite the method being named json(), the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.

Syntax

json()

Parameters

None.

Return value

A Promise that resolves to a JavaScript object. This object could be anything that can be represented by JSON — an object, an array, a string, a number…