You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a log file where each line is a JSON record. It would be handy to be able to use rich to pretty-print the log file to make it more easily human-parseable from the command line.
The text was updated successfully, but these errors were encountered:
Not all JSON tools can handle JSON Lines. I agree that this could be a nice feature to add!
As a workaround, you can convert the file from JSON Lines to a regular JSON array with jq, and then pipe it to rich: cat foo.jsonl | jq -s | rich --json -
Of course, if you already have jq installed, it will also pretty-print your JSON Lines data directly... 😊 jq < foo.jsonl
I think I didn't have jq installed so reached for what was available... and I wanted to try out rich-cli! 😀
In the intervening months I've gotten a lot more familiar with jq so would probably use that for the job. It might still be nice if it were supported by rich but probably not a very high priority.
I have a log file where each line is a JSON record. It would be handy to be able to use
rich
to pretty-print the log file to make it more easily human-parseable from the command line.The text was updated successfully, but these errors were encountered: