> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# json-roundtrip-clone

> A value is deep-cloned with JSON.parse(JSON.stringify(...)) on a request path.

## What it flags

A value is deep-copied with `JSON.parse(JSON.stringify(...))` in a request handler or repeated work. One-off data migrations and module initialization are outside the hot path. Known custom `toJSON` methods and BSON wire conversions preserve their serialization behavior. A local MongoDB group-key projection remains outside the rule when its result has an unknown or unchecked type. A known plain-data projection can still report a finding.

## How to review or fix

The review edit substitutes `structuredClone` for a literal plain JSON value. Review other reported cases by copying only the fields you change or confirming the original serialization behavior is unnecessary.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "json-roundtrip-clone": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.