You can solve that with a simple javascript script running on node.
- install node.js
- install the
js-yaml
package: npm install js-yaml -g
Then save this script into a file, and run it with node.js:
var inputfile = 'input.yml',
outputfile = 'output.json',
yaml = require('js-yaml'),
fs = require('fs'),
obj = yaml.load(fs.readFileSync(inputfile, {encoding: 'utf-8'}));
// this code if you want to save
fs.writeFileSync(outputfile, JSON.stringify(obj, null, 2));