# Libtmux_json.Expr

- **Package:** libtmux-json
- **Language:** OCaml
- **Kind:** module
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/json/libtmux_json.mli#L73
- **Public owner:** Libtmux_json
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux_json-expr/

```ocaml
module Expr
```

Portable scalar pane expressions. See the [wire subset](https://github.com/libtmux/libtmux-ocaml/blob/master/docs/query-interchange.md) for canonical fields, operators and bounds.

## Members

### Common operations

- [`decode`](/en/ocaml/latest/reference/libtmux_json-expr-decode/) (function): Validate the supplied tree, including duplicate properties, before typed construction. Only the shared scalar pane registry and Boolean composition are accepted. Java regex, relationships and native extension fields return `Unsupported`. Numbers must fit signed 32-bit integers.
- [`of_string`](/en/ocaml/latest/reference/libtmux_json-expr-of_string/) (function): Enforce 64 KiB and 32 JSON nesting levels before parsing; require valid UTF-8 JSON. Expressions have at most 1,024 nodes and membership lists at most 256 values. Errors include a JSON pointer, never the whole input.

### Other members

- [`encode`](/en/ocaml/latest/reference/libtmux_json-expr-encode/) (function)
- [`to_string`](/en/ocaml/latest/reference/libtmux_json-expr-to_string/) (function): Apply the same bounds and subset when encoding. Text with invalid UTF-8 has no representation in this schema. These functions perform no I/O.

## Guides

Pages that discuss `Expr`.

- [Share a scalar pane query](/en/ocaml/latest/guides/query-interchange/)
