# Libtmux_json.Expr.decode

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

```
val decode :
  'a Libtmux.Model.t ->
  Yojson.Safe.t -> ('a Libtmux.Expr.t, Decode_error.t) result
```

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.

## Parameters

- `arg1` (`'a Libtmux.Model.t`)
- `arg2` (`Yojson.Safe.t`)

## Guides

Pages that discuss `decode`.

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