Skip to content

purejq 0.3.1

Latest

Choose a tag to compare

@adam2go adam2go released this 17 Jun 01:39

Robustness release — same jq semantics (777 conformance tests pass unchanged), no input can crash the parser.

An adversarial fuzz sweep (120k calls) found three inputs that escaped jq's error model; all now raise a clean JqParseError:

  • malformed \u escapes ("\uZZZZ") raised ValueError
  • Unicode-but-not-ASCII characters after . (e.g. ) raised AttributeError
  • deeply nested programs ([[[[…, {a:{a:…) raised RecursionError and could overflow the C stack under a raised recursion limit

The parser now caps structural nesting at a fixed depth that trips under CPython's default recursion limit on every platform, with a backstop catch for long flat pipe/operator chains.