# LibTmux::Filter::to_json

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** Perl
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-perl/blob/352715a4fa66a96eed7763b90daaa536aa2f121d/packages/core/lib/LibTmux/Filter.pm#L311
- **Page:** https://libtmux.org/en/perl/latest/reference/libtmux-filter-to_json/

```
sub to_json($self)
```

Return canonical-key UTF-8 JSON octets using [JSON::PP](https://perldoc.perl.org/5.44.0/JSON::PP). Non-UTF-8 opaque path bytes throw [`UnsupportedValue`](/en/perl/latest/reference/libtmux-x-unsupportedvalue/). This is reproducible key order, not semantic canonicalization of arbitrary Boolean trees.

## Methods
