YAML (YAML Ain't Markup Language)
YAML e uma linguagem de serializacao de dados legivel por humanos, frequentemente utilizada para ficheiros de configuracao e troca de dados. Utiliza indentacao em vez de chavetas ou tags, tornando-o visualmente limpo e facil de editar.
Tipo MIME
application/x-yaml
Tipo
Texto
Compressão
Sem perdas
Vantagens
- + 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
Desvantagens
- − 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
Quando usar .YAML
Use YAML para ficheiros de configuracao (Docker Compose, Kubernetes, CI/CD), dados legivel por humanos e configuracoes de aplicacoes.
Detalhes técnicos
O YAML utiliza indentacao (espacos, nao tabs) para estrutura, suporta ancoras e alias para deduplicacao e permite multiplos documentos num unico ficheiro. A especificacao YAML 1.2 e um superconjunto do JSON.
Histórico
O YAML foi proposto pela primeira vez por Clark Evans em 2001. A especificacao evoluiu atraves das versoes 1.0 (2004), 1.1 (2005) e 1.2 (2009), esta ultima alinhando o YAML mais estreitamente com o JSON.
Converter de .YAML
Converter para .YAML
Formatos relacionados
Termos relacionados
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 …