Utility to convert between YAML and JSON