Paste your JSON here
See the YAML output here
(function () { "use strict"; var YAML = require('prettyaml') , json , data , yml ; json = '{ "foo": "bar" }'; data = JSON.parse(json); yml = prettyaml.stringify(data); console.log(yml); }());
npm install prettyaml
<script src="http://fiatjaf.github.io/prettyaml/js/prettyaml.js"></script>
(function () { "use strict"; var YAML = window.YAML , json , data , yml ; json = '{ "foo": "bar" }'; data = JSON.parse(json); yml = prettyaml.stringify(data); console.log(yml); }());
import json import pyaml str = '{ "foo": "bar" }' data = json.loads(str) yml = pyaml.dump(data) print(yml)
pip install pyaml