Secondary menu

Skip to primary content
Skip to secondary content
  • Podcast & Screencast
  • LifeStream
  • Trips
  • Photos
  • Digital Me
  • Wish List
  • Wiki
  • My Tweets
  • Projects
  • About me
  • My T-Shirts Shop

oriolrius.cat

Oriol Rius :: Technology : Crecimiento Personal : Mussol

Main menu

Skip to primary content
Skip to secondary content
  • Home
  • technology
  • crecimiento personal
  • mussol

Tag Archives: yaml

Aug 12

Convert JSON file to YAML file using CLI

Posted on 2019/08/12 by Oriol Rius
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
Posted in System administration, Databases, Messaging and Security, technology | Tagged cli, json, linux, python, sysadmin, yaml | Leave a reply
May 15

Trick: xml2yaml

Posted on 2006/05/15 by Oriol Rius

Reading time: < 1 minute

Petit trick per convertir un fitxer XML a un fitxer YAML (yml) amb Perl, fan falta les llibreries pertinents de perl.

perl -MYAML -MXML::Simple -e 'print Dump XMLin "fixer.xml"'
Posted in TechTips | Tagged linux, perl, xml, yaml, yml | Leave a reply
Creative Commons Attribution-Share Alike 2.5 Spain License.
Creative Commons License
Privacy Policy
Admired Theme