YAML (YAML Ain't Markup Language)
YAML est un format de sérialisation de données lisible par l'homme, conçu pour être facilement lu et écrit par les humains. Il est largement utilisé pour les fichiers de configuration, les définitions CI/CD et l'infrastructure en tant que code.
Type MIME
application/x-yaml
Type
Texte
Compression
Sans perte
Avantages
- + Highly readable — minimal syntax noise
- + Supports comments for inline documentation
- + Native in Docker, Kubernetes, Ansible, and CI/CD systems
- + Superset of JSON — any JSON is valid YAML
Inconvénients
- − Indentation-sensitive — whitespace errors cause silent failures
- − Implicit type coercion can cause bugs ('yes' becomes boolean true)
- − More complex specification than JSON with anchors, tags, and directives
Quand utiliser .YAML
Utilisez YAML pour les fichiers de configuration (Docker Compose, Kubernetes, GitHub Actions), les pipelines CI/CD et les définitions d'infrastructure. Préférez TOML pour les configurations d'application simples ou JSON pour les échanges de données programmatiques.
Détails techniques
YAML utilise l'indentation pour la structure (pas de crochets/accolades), prend en charge les ancres/alias, les documents multiples et les types de données complexes. C'est un sur-ensemble strict de JSON (tout JSON valide est du YAML valide). L'analyse peut être coûteuse ; les vulnérabilités de sécurité incluent l'exécution de code arbitraire dans les chargeurs non sécurisés.
Historique
YAML a été proposé pour la première fois par Clark Evans en 2001, avec les co-créateurs Ingy döt Net et Oren Ben-Kiki. Le nom signifiait à l'origine « Yet Another Markup Language » avant d'être reformulé récursivement en « YAML Ain't Markup Language » pour souligner qu'il s'agit de données et non de balisage.
Convertir depuis .YAML
Convertir en .YAML
Formats associés
Termes associés
Learn More
JSON vs YAML vs TOML: Choosing a Configuration Format
Configuration files are the backbone of modern applications. JSON, YAML, and TOML each offer different trade-offs between readability, complexity, and …
How to Format and Validate JSON Data
Malformed JSON causes silent failures in APIs and configuration files. Learn how to format, validate, and debug JSON documents to …
Base64 Encoding: How It Works and When to Use It
Base64 converts binary data into ASCII text, making it safe for transmission through text-based systems. Learn when Base64 is the …
Best Practices for Working with Unix Timestamps
Unix timestamps provide a language-agnostic way to represent points in time, but they come with pitfalls around time zones, precision, …
Troubleshooting JWT Token Issues
JSON Web Tokens are widely used for authentication but can be frustrating to debug. This guide covers common JWT problems …
Hash Functions Compared: MD5, SHA-1, SHA-256, and Beyond
Hash functions are used for file integrity, password storage, and digital signatures. This comparison covers the most common algorithms, their …