Closed noraj closed 3 years ago
hey @noraj thanks you for testing my code, awesome work, thanks a lot.
True i just needed to replace: this code:
click.echo({"projects": projects, "total": len(projects)})
By:
click.echo(json.dumps({"projects": projects, "total": len(projects)}))
now:
rawsec-cli list os -o json | jq # => ok
I had a good guess it was a python dict vs JSON object issue.
yes
Describe the bug
-of json
is fine and export json using double quotes,-o json
is exporting json with single quotes which is invalid and so break all json parsers.To Reproduce
Expected behavior
Environment (please complete the following information):
Idea
Just replace simple quotes with double quotes (or export python dict to JSON).