Skip to content

Respect Json flags when no results are found - #478

Open
Arthi-chaud wants to merge 2 commits into
ndmitchell:masterfrom
Arthi-chaud:fix/json-output-no-res
Open

Arthi-chaud wants to merge 2 commits into
ndmitchell:masterfrom
Arthi-chaud:fix/json-output-no-res

Conversation

@Arthi-chaud

Copy link
Copy Markdown

Hi!

When running a search using the cli, when no results are found, hoogle outputs a human-readable message, even when the json or jsonl option is set.

I believe it would be better to output valid JSON/L data when these formats are required, i.e. outputting "[]" (or "" for JSONL). This is what this PR fixes

@Arthi-chaud Arthi-chaud changed the title Use Json format when no results found Respect Json flags when no results are found Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant