Not to threadcrap, but I am curious what people think about this. Over the years I've seen a lot of developers take none open-source code, or private JSON data strings and paste them into random sites they find searching "json format" on google. Does that make anyone else cringe? Is there anything we can do about this? Or is this just not a big deal and I shouldn't worry.
I had a junior dev show me a neat site where you can paste in a Java thread dump and it performs an analysis. After explaining why it's a bad practice to send diagnostic details to an un-trusted third party I think he understood, but it seems like every week I'm finding people using ngrok, unauthorized password managers, grammarly, JWT parsers, Base64 encoders, and all manner of questionable tools. I too wonder if I'…
Show HN: JSON Pizza – Beautify your JSON quickly
31–40 of 81 posts
Re: Show HN: JSON Pizza – Beautify your JSON quickly
#32Non web based approach using jq ( https://stedolan.github.io/jq/ ): json_source_on_stdout | jq .
Re: Show HN: JSON Pizza – Beautify your JSON quickly
#33OS X includes the json_pp command, so I often just do this to format JSON in my clipboard: pbpaste | json_pp | pbcopy For just viewing, I like Node's console.dir() formatting better since it's more compact and colored (but it's unquoted JS objects, not JSON), so I aliased this command in my shell: json='node -e '\''console.dir(JSON.parse(fs.readFileSync("/dev/stdin", "utf-8")), { depth: null })'\' Then I can do pbpas…
cat foo.json | python3 -m json.tool
Prettifying is also built in to python3 on any system.Re: Show HN: JSON Pizza – Beautify your JSON quickly
#34OS X includes the json_pp command, so I often just do this to format JSON in my clipboard: pbpaste | json_pp | pbcopy For just viewing, I like Node's console.dir() formatting better since it's more compact and colored (but it's unquoted JS objects, not JSON), so I aliased this command in my shell: json='node -e '\''console.dir(JSON.parse(fs.readFileSync("/dev/stdin", "utf-8")), { depth: null })'\' Then I can do pbpas…
Or cat foo.json | python3 -m json.tool Prettifying is also built in to python3 on any system.
jq . foo.jsonRe: Show HN: JSON Pizza – Beautify your JSON quickly
#35Re: Show HN: JSON Pizza – Beautify your JSON quickly
#36Earlier quoted context omitted.
I had a junior dev show me a neat site where you can paste in a Java thread dump and it performs an analysis. After explaining why it's a bad practice to send diagnostic details to an un-trusted third party I think he understood, but it seems like every week I'm finding people using ngrok, unauthorized password managers, grammarly, JWT parsers, Base64 encoders, and all manner of questionable tools. I too wonder if I'…
It can also happen you don’t care about the data you are sharing. Why not using an online then?
Or maybe I'm a crank and need to lighten up. That's why I'm asking.
Re: Show HN: JSON Pizza – Beautify your JSON quickly
#37aka const formattedText = JSON.stringify(JSON.parse(text), null, 2)`
Re: Show HN: JSON Pizza – Beautify your JSON quickly
#38OS X includes the json_pp command, so I often just do this to format JSON in my clipboard: pbpaste | json_pp | pbcopy For just viewing, I like Node's console.dir() formatting better since it's more compact and colored (but it's unquoted JS objects, not JSON), so I aliased this command in my shell: json='node -e '\''console.dir(JSON.parse(fs.readFileSync("/dev/stdin", "utf-8")), { depth: null })'\' Then I can do pbpas…
Or cat foo.json | python3 -m json.tool Prettifying is also built in to python3 on any system.
python3 -m json.tool foo.json
Re: Show HN: JSON Pizza – Beautify your JSON quickly
#39OS X includes the json_pp command, so I often just do this to format JSON in my clipboard: pbpaste | json_pp | pbcopy For just viewing, I like Node's console.dir() formatting better since it's more compact and colored (but it's unquoted JS objects, not JSON), so I aliased this command in my shell: json='node -e '\''console.dir(JSON.parse(fs.readFileSync("/dev/stdin", "utf-8")), { depth: null })'\' Then I can do pbpas…
pbpaste | jqRe: Show HN: JSON Pizza – Beautify your JSON quickly
#40Non web based approach using jq ( https://stedolan.github.io/jq/ ): json_source_on_stdout | jq .
json_source_on_stdout | jq
If you give `jq` no arguments it acts like `jq .`