# getStateDiffJson

Description: getStateDiffJson cheatcode documentation

Note: This document was authored using MDX

  Source: https://github.com/NomicFoundation/hardhat-website/tree/main/src/content/docs/docs/reference/cheatcodes/Environment/get-state-diff-json.mdx

### Signature

```solidity
function getStateDiffJson() external view returns (string memory diff);
```

### Description

Returns state diffs from current `vm.startStateDiffRecording` session, in json format.
