> For the complete documentation index, see [llms.txt](https://overmindjs.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overmindjs.org/v25/api-1/json.md).

# json

Overmind wraps objects and arrays in your state structure with proxies. If you pass state to 3rd party libraries, to a service worker or similar, you should pass a long a copy of that state. This avoids the 3rd party tool from mutating your state when you do not want it to.

```typescript
import { json } from 'overmind'

const copy = json(someValue)
```

This function does a copy of any plain object or array, which are the only values that is wrapped with proxies. This ensures minimal work is done and keeps all other values alone.
