check_json(value: string) -> string

check_json validates that a string holds JSON. Well-formed documents return an empty string, while syntax or structural problems return a non-empty error message string. The argument must be string-typed in OPAL.

Domain

This is a scalar function (calculates a single output value for a single input row).

Categories

Examples

Validates raw JSON text and maps a clean document to an empty string while surfacing errors as text via check_json.

Shows check_json returning a non-empty diagnostic when duplicate object keys violate strict JSON rules.