you are viewing a single comment's thread
view the rest of the comments
[โ€“] 3 points 2 years ago (1 child)

Could probably do the same with :! jq . It's a bit shorter.

  • source
  • parent
  • hideshow 2 child comments
  • [โ€“] 3 points 2 years ago (1 child)

    Yeah, I knew someone was going to say that. Usually it's more likely that Python is installed than jq - especially on servers. But yes, that would definitely work too.

  • source
  • parent
  • hideshow 2 child comments
  • Sure, I'm just not sure when I'd ever run into that. Either I'm doing it a lot and installing jq is reasonable, or I'm not allowed on the server anyway and need to copy/paste from logs.

    I used to use python -m json.tool a lot, but I haven't needed to in many years.

  • source
  • parent