TJA! to Programmer Humor@programming.dev • 11 months agoA box of DevOpssh.itjust.worksimagemessage-square47fedilinkarrow-up1770arrow-down126
arrow-up1744arrow-down1imageA box of DevOpssh.itjust.worksTJA! to Programmer Humor@programming.dev • 11 months agomessage-square47fedilink
minus-square@Cratermaker@discuss.tchncs.delinkfedilink4•11 months agoI wrote a json prettifier a couple months ago with just a couple lines of code. I thought it would take a while but ended up taking like 10 minutes.
minus-square@ElectricCattleman@lemmy.worldlinkfedilinkEnglish5•11 months agojs’s JSON.stringify(obj, null, 2);
Json is incredibly easy to prettify.
I do it by converting to yaml ;)
I wrote a json prettifier a couple months ago with just a couple lines of code. I thought it would take a while but ended up taking like 10 minutes.
js’s
JSON.stringify(obj, null, 2);
Import json Import pprint?
| jq
| jq
I use jq pretty much every day