Edit this page

up.Response up.Response.prototype.json
Property

The response body parsed as a JSON string.

The parsed JSON object is cached with the response object, so multiple accesses will call JSON.parse() only once.

Note

This method can only parse regular JSON values. Relaxed JSON is not supported here.

Example

let response = await up.request('/profile.json')
console.log("User name is " + response.json.name)

Value

json Object