Yaml <-> Json
Yaml is a superset of Json [SO], and as such there is some form of duality between the two that can be used.
Json to Yaml (online)
#!/usr/bin/env ruby
require 'yaml'
require 'json'
puts(JSON.load(ARGF.read).to_yaml)
Yaml to Json (online)
#!/usr/bin/env ruby
require 'yaml'
require 'json'
puts(YAML.load(ARGF.read).to_json)
Written on August 29, 2018, Last update on November 9, 2019
yaml
json
ruby
online