Changes for version 1.25 - 2025-10-24

  • CLI
    • Fix YAML input handling in jq-lite: allow scalar (non-ref) results to be encoded without warnings or failure by adding `allow_nonref` to the JSON::PP encoder in `print_results`. This resolves failures in t/yaml_cli.t:
      • YAML files auto-detected by extension now work as expected.
      • No warnings are emitted when parsing YAML (file or STDIN with --yaml).
      • Process exits successfully (status 0) on valid YAML input.
      • (PR: GH#XX)
  • Behavior
    • Output behavior for JSON inputs is unchanged; raw/compact/color options continue to work as before. YAML input is first converted to JSON and scalar top-level values are now treated correctly.
  • Internals
    • Minimal code change: `JSON::PP->new->utf8->allow_nonref->canonical` in `print_results`.

Modules

A lightweight jq-like JSON query engine in Perl

Provides

in lib/JQ/Lite/Expression.pm
in lib/JQ/Lite/Filters.pm
in lib/JQ/Lite/Parser.pm
in lib/JQ/Lite/Util.pm