9 ms·
I also snarked a bit when I saw your word count example, but immediately reversed course when I saw the JSON formatting one-liner. I will use this. I will use t
by function_seven 3y ago
I also snarked a bit when I saw your word count example, but immediately reversed course when I saw the JSON formatting one-liner. I will use this. I will use the hell out of it. Thanks!
RIP Bram.
- TonyStr 3y agoWhat does `%!python -m json.tool` offer that `%!jq` doesn't?
- function_seven 3y agoI don’t know. I’m assuming I should install jq (or see if I already have it?) Here’s the problem I have: I don’t often have to format unformatted JSON, but when I do, it’s almost always an error message I’m trying to parse in order to track down a bug. So I tell myself “I should really figure out how to automate this…I know it’s obviously possible, but I just really wanna fix this bug right now, so I’ll do that later.” And then the next time it happens, I curse myself for not having researched that, and promise to do it before the next time. So I’m just happy that I stumbled across this page. Now I don’t have to remember to research it :)
- cerved 3y agoChances are higher that python is installed than jq, other than that can't think of any