News for hackers. Stuff that matters.
Re:Using jq to format JSON on the clipboard by lkbm on Wednesday September 02, 2026 @11:47AM (#49538059)
I have this as a bash script and a some similar bash and python scripts for converting between python's print(my_dict) and json, or to run some python (mostly the dicts) through black.

The j2p is pretty self-evident if you know any python, and the only trick to p2j was knowing `ast.literal_eval(input_str)`.

Re:Using jq to format JSON on the clipboard by megagpt1 on Wednesday September 02, 2026 @11:58AM (#49538246)
Should be print(repr(my_dict)) in case my_dict is actually a string, or you'd have an injection attack