prefer JSON, but fall back to YAML if JSON isn't available