# LibTmux.Wire

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** module
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/66b9b1c3f3f3186428abdfda2c76f5cf87446710/lib/libtmux/wire.ex#L1
- **Page:** https://libtmux.org/en/elixir/latest/reference/libtmux-wire/

Bounded JSON decoding with duplicate keys preserved until validation.

Uses the built-in JSON decoder callbacks. Object keys stay strings; no
atoms are created. Byte, nesting, node, array and string ceilings apply
before conversion to public maps. Parsing failures retain root paths and
offsets where supplied; duplicate-key failures identify the object path.
Depth starts at zero for the root value and increases for every object
member or array element; the maximum is inclusive for maps and JSON alike.

## Members

### Other members

- [`decode/2`](/en/elixir/latest/reference/libtmux-wire-decode-2/) (function): Decodes one complete bounded JSON value, rejecting duplicate keys and trailing data.
- [`object/0`](/en/elixir/latest/reference/libtmux-wire-object-0/) (typealias): A JSON object whose keys remain strings; validation never creates atoms from external names.
- [`validate/2`](/en/elixir/latest/reference/libtmux-wire-validate-2/) (function): Validates already-decoded JSON data and its complete encoded byte size.
- [`value/0`](/en/elixir/latest/reference/libtmux-wire-value-0/) (typealias): A JSON value with string-keyed objects; invalid external terms return a validation error.
