YAML (ليست لغة ترميز)
YAML هي لغة تسلسل بيانات سهلة القراءة تستخدم المسافات البادئة لتمثيل البنية. وهي التنسيق المفضل لملفات التكوين في أدوات DevOps (مثل Docker Compose وKubernetes وAnsible وGitHub Actions) وهي مجموعة فوقية من JSON.
نوع MIME
application/x-yaml
النوع
نص
الضغط
بدون فقدان
المزايا
- + 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
العيوب
- − 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
متى تستخدم .YAML
استخدم YAML لملفات التكوين وخطوط أنابيب CI/CD وتنسيق الحاويات وأي بيانات منظمة يحررها البشر.
التفاصيل التقنية
يستخدم YAML المسافات البادئة (مسافات وليس علامات تبويب) للتداخل، والنقطتين لأزواج المفتاح-القيمة، والشرطات لعناصر القوائم. يدعم المراسي (&) والأسماء المستعارة (*) لإعادة استخدام البيانات، والسلاسل متعددة الأسطر، والتعليقات.
التاريخ
أنشأ Clark Evans وIngy döt Net وOren Ben-Kiki تنسيق YAML في 2001. الاسم التكراري يعني 'YAML ليست لغة ترميز'. وحّد YAML 1.2 (2009) المواصفات كمجموعة فوقية من JSON.
التحويل من .YAML
التحويل إلى .YAML
صيغ ذات صلة
مصطلحات ذات صلة
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 …