simeji/jid

Loaded JSON file is one-line form inside jid

Closed this issue · 4 comments

Hello,

I tried jid and this tool looks really great, thx for that.
I have question about formatting. When I tried the example from readme I see all the time json in one-line format:

$ echo '{"aa":"2AA2","bb":{"aaa":[123,"cccc",[1,2]],"c":321}}' | jid
[Filter]> .
{"aa":"2AA2","bb":{"aaa":[123,"cccc",[1,2]],"c":321}}

I tried to use python -m json.tool but still the same result:

echo '{"aa":"2AA2","bb":{"aaa":[123,"cccc",[1,2]],"c":321}}'| python -m json.tool | jid
hood commented

Same here, using v0.7.6 with kitty v0.19.1 on Arch.

I tried it again and now it works. JSON is properly formatted and colored. I didn't change anything. For me, this request can be closed.

cben commented

Same here, it's one line & truncated.
Running jid v0.7.6.
Fedora 33, go1.15.13. gnome-terminal, xterm, konsole — terminal doesn't seem to matter.

cben commented

Hmm, that was installing it by the one-liner go get -u github.com/simeji/jid/cmd/jid.
But a manual git clone and go install ./cmd/jid/, whether from master or any of v0.7.4 to v0.7.6, works fine — indented and multi-line. No idea what's the difference 🤷