oriolrius.cat

Des del 2000 compartiendo sobre…

Convert JSON file to YAML file using CLI

Reading time: < 1 minute

Just a cookbook about how to get a YAML file when you have a JSON one.

python -c 'import sys, yaml, json; yaml.safe_dump(json.load(sys.stdin), sys.stdout, default_flow_style=False)' < file.json > file.yaml

One thought on “Convert JSON file to YAML file using CLI

  1. I agree with your point of view, your article has given me a lot of help and benefited me a lot. Thanks. Hope you continue to write such excellent articles.

Últimas entradas

Enhancing SSH Security with StealthSSHAccess

Reading time: 4 – 7 minutes In today’s interconnected world, maintaining the security of your server infrastructure is paramount. One critical point of vulnerability is the SSH (Secure Shell) service, which allows remote administration of servers. Despite using a non-default

Leer más »
Archivo