22032 — invalid_json_text
22032
At a glance
JSON text is invalid for the consuming operation. No fixed 18.6 emitting report group was resolved in the bounded scan.
| Field | Value |
|---|---|
| SQLSTATE | 22032 |
| Condition | invalid_json_text |
| Status | active |
| Known present by | 12.0 |
| Locked snapshots | 12.22, 13.23, 14.24, 15.19, 16.15, 17.11, 18.6, 19beta3 |
| Macros | ERRCODE_INVALID_JSON_TEXT |
| Aliases | — |
Meaning
The locked definition names invalid_json_text, but the bounded PostgreSQL 18.6 source review did not resolve a native emitting report group for this code. This page therefore does not assign a parser function, primary text, DETAIL, HINT, severity path, or SQL/JSON mode from the condition name alone.
Diagnosis
If 22032 appears, preserve the complete diagnostic and the consuming operation, including whether the input was json, jsonb, SQL/JSON, or an extension value. Validate the exact text and encoding at that boundary, but do not replace the unknown emitter with a guessed ordinary cast or client path. Related JSON cardinality codes have their own fixed guards.
Response
Use the actual emitter’s primary, DETAIL, and HINT to repair the JSON text or its boundary. If the operation is in an explicit transaction and raises ERROR, roll back or roll back to the existing savepoint before retrying; autocommit can retry corrected input. This recovery guidance is general and is not a 22032 runtime observation.
Versions
The locked catalogue records this condition from 12.0. Only the PostgreSQL 18.6 definition row is fixed here; no native emitting path or natural runtime observation is claimed.
Related
Sources
The fixed definition row is src/backend/utils/errcodes.txt#L217. The bounded source review did not resolve a native 22032 emitter; the structured evidence record keeps that unknown scope explicit, and no natural runtime was run.