less a file with JSON rows - how to highlight/colorize the rows?
1
vote
1
answer
1725
views
I have log files with json rows inside - less displays it as just plain text
Can I colorize the output with less abilities?
As well as I didn't find any less-compatible third party tool with json highlighting
Example of such file
{"date":"2021-10-21 16:09:54", "perf":{"action":"getTimelineByClient", "time":46.2}}
{"date":"2021-10-22 16:09:54", "perf":{"action":"getTimelineByClient", "time":46.2}}
{"date":"2021-10-23 16:09:54", "perf":{"action":"getTimelineByClient", "time":46.2}}
Edit
@glennjackman kindly pointed to https://github.com/sharkdp/bat - great tool, not fit for my needs, but maybe will be helpful for the other.
bat
firstly parses the file and afterwards tries to show it. 120k of short json rows were pretty heavy for my machine
Asked by Doc999tor
(111 rep)
Oct 24, 2021, 02:16 PM
Last activity: Oct 26, 2021, 12:56 AM
Last activity: Oct 26, 2021, 12:56 AM