CAN I USE JSON INSTEAD OF YAML FOR MY COMPOSE FILE? 4 Oct 2016 Can I use json instead of yaml for my Compose file? Yes. Yaml is superset of JSON, so any JSON file should be valid Yaml. To use a JSON file with Compose, specify the filename to use, for example: docker-compose -f docker-compose.json up