Hello ALL,
Very much new to ruby. i have a yaml file ( xyz.yaml ) and i wanna write
a code in ruby which can give me o/p in json. Please help
Thanks,
AK
Hello ALL,
Very much new to ruby. i have a yaml file ( xyz.yaml ) and i wanna write
a code in ruby which can give me o/p in json. Please help
Thanks,
AK
require’json’ and require’yaml’
puts YAML.load(File.read(“xyz.yaml”)).to_json
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs