puppeteer/docs/api/puppeteer.jshandle.jsonvalue.md

28 lines
436 B
Markdown
Raw Permalink Normal View History

2022-07-05 13:41:43 +00:00
---
sidebar_label: JSHandle.jsonValue
---
# JSHandle.jsonValue() method
A vanilla object representing the serializable portions of the referenced object.
#### Signature:
2022-07-05 13:41:43 +00:00
```typescript
class JSHandle {
abstract jsonValue(): Promise<T>;
2022-07-05 13:41:43 +00:00
}
```
**Returns:**
Promise&lt;T&gt;
## Exceptions
Throws if the object cannot be serialized due to circularity.
2022-07-05 13:41:43 +00:00
## Remarks
If the object has a `toJSON` function, it **will not** be called.