Convert YAML to JSON

python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < file.yaml > file.json
Converts YAML file to JSON. Note that you'll need to install PyYAML. Also some YAML data types (like dates) are not supported by JSON).

4
By: tebeka
2013-04-24 00:28:55

2 Alternatives + Submit Alt

What Others Think

Any idea how to change the output to have the whole json in a oneliner?
zoobab · 127 weeks and 3 days ago
Best work you have done, this online website is cool with great facts and looks. I have stopped at this blog after viewing the excellent content. I will be back for more qualitative work. Treatment of varicose veins
KayGasaway · 5 weeks and 2 days ago
We are the leader in total gambling. If you want to find out how to play which website baccarat is good Online baccarat, which website is good? Which website to bet on, or others? We would like you to come and try the impressive service of 789mega with a system that supports tens of thousands of users ???????? ???????? 2021 pantip
KayGasaway · 3 weeks and 5 days ago
Bihar Board 10th Model Paper 2022 Pdf Download for BSEB 10th Question Paper 2022 to Matric Important Question for English ; Hindi Medium Solved Bihar Board 10th Model Paper
KayGasaway · 3 weeks and 5 days ago
Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post with people.. www.associateonelogin.com
KayGasaway · 2 weeks and 6 days ago
hello!! Very interesting discussion glad that I came across such informative post. Keep up the good work friend. Glad to be part of your net community. roadrunner email login
KayGasaway · 2 weeks and 4 days ago
Explore about John Barban Javaburn review The 7 Undeniable Facts. In this Java Burn review, we’ll be taking a close look at the product, uncovering 7 undeniable facts about John Barban weight loss packets. John Barban Javaburn review
KayGasaway · 2 weeks and 4 days ago
Countquick Accounting Services is specialised to fix issues when user is unable to send emails through outlook. We also provide help when user cant send invoices and statements. QB Error incorrect password when trying to send emails. Top quality Quickbooks support |18004769446
KayGasaway · 2 weeks and 4 days ago
Pretty good post. I have just stumbled upon your blog and enjoyed reading your blog posts very much. I am looking for new posts to get more precious info. Big thanks for the useful info. rr mail
KayGasaway · 2 weeks and 3 days ago
Pin badges Enamel Badges provides a massive range of custom enamel badges in the UK. we offer soft and hard enamel badges, die struck badges, and printed badges. https://www.enamelbadges.com/
KayGasaway · 2 weeks and 1 day ago
Explore Chicago Permit Expediter | Permit Expediting Chicago & Code Compliances Services, The Best Chicago Permit Expediter & chicago building permits, Permit studio offer chicago permit services, IL, As best chicago permit expediter, our team consists of a variety of talented and passionate professionals with backgrounds in architecture, interior design, planning, construction, and project management. Please visit our website for more info, Thank You http://ideate.xsead.cmu.edu/discussion/introduction-to-media-synthesis-and-analysis/topics/frank-thomas">here
KayGasaway · 1 week and 3 days ago
King's Kids has caring teachers that use Bible stories and fun activities to teach children about Jesus. Kid's Ministry offers classes and other exciting events for all ages every Sunday morning at 10:00 AM. Ocala.Church offers the most dynamic and spirit filled worship, preaching and teaching available in Marion County, Florida with age specific sessions and content for all age groups. Explore church ocala fl as each service here you’ll find a vibrant multicultural atmosphere with exciting, contemporary worship music and a powerful message that will speak to you where you are at. On Sunday mornings, children are well-cared for in fun-filled Sunday School classrooms. church ocala fl
KayGasaway · 4 days ago
Plan a visit with Ocala's Pentecostal Church in Florida, From the initial decision to learn more about who Jesus is to your involvement in life-changing ministry, we will lead you step-by-step from healing to growth and into leadership. Begin the Process by clicking here to visit our official website. Thank You. Ocala's Pentecostal Church
KayGasaway · 8 hours ago
Allow QUALITYWEB 360 to do the heavy job for you, A software gestione documentale ?(quality management system software) with its unique features: accessibility wherever you go, security of your data, certificates and acknowledgments.Please visit our website to get free trial of 14 days.
KayGasaway · 6 hours ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: