json( )


Reads the response body as JSON.

The json() function reads the body response stream to its completion and parses it as JSON. It returns a Promise that resolves to the response body as a JSON object.

Method Declaration
Copy
function json(): Promise<object>;
Request
This method does not take any parameters
Returns
Return Type:Promise<object>
JavaScript
let json = response.json(); // {"key": "some value"}
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?