# tmux.Snapshot.MarshalJSON

- **Module:** tmux.Snapshot
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmux/marshal.go#L88
- **Page:** https://libtmux.org/en/go/latest/reference/tmux-snapshot-marshaljson/

```
tmux.Snapshot.MarshalJSON() -> ([]byte, error)
```

MarshalJSON encodes the snapshot's tmux version and the records it holds. A kind it listed encodes as an array, empty when tmux reported none; a kind it never listed is absent. Those are different answers, and one field cannot spell both, which is why the arrays are pointers here. Nothing decodes; see [Session.MarshalJSON].
