# Understanding jq Type Errors and the Plus Operator in jqlang/jq

> Learn to resolve jq type errors with the plus operator. Understand how jqlang/jq enforces type safety and generates runtime errors for improved JSON processing.

- Repository: [jqlang/jq](https://github.com/jqlang/jq)
- Tags: deep-dive
- Published: 2026-04-11

---

**The jq programming language enforces strict type safety for the binary `+` operator, generating descriptive runtime errors via `type_error2` in [`src/builtin.c`](https://github.com/jqlang/jq/blob/main/src/builtin.c) whenever incompatible JSON types are combined.**

The `jqlang/jq` repository implements the `+` operator as a type-aware builtin that only permits addition between compatible JSON value kinds. When operands mismatch—such as attempting to add a number to a string—the interpreter returns a detailed type error rather than coercing values. This article examines the source code implementation, error handling mechanisms, and practical