TOML (Tom's Obvious, Minimal Language)
एक मिनिमल कॉन्फ़िगरेशन फ़ाइल फॉर्मेट जो पढ़ने में आसान और अस्पष्टता-मुक्त है। TOML कॉन्फ़िगरेशन फ़ाइलों के लिए डिज़ाइन किया गया है और Rust (Cargo.toml), Python (pyproject.toml) आदि में उपयोग होता है।
MIME Type
application/toml
प्रकार
टेक्स्ट
संपीड़न
दोषरहित
लाभ
- + Unambiguous — no implicit type coercion unlike YAML
- + Native datetime support without quoting
- + Simple, flat structure that maps directly to hash tables
- + Standard in Rust and Python ecosystems
हानियाँ
- − Deeply nested data structures become verbose
- − Less widespread tool support compared to JSON and YAML
- − No standard way to represent null values
.TOML कब उपयोग करें
Rust प्रोजेक्ट (Cargo.toml), Python प्रोजेक्ट (pyproject.toml), Hugo साइट कॉन्फ़िग, ऐप्लिकेशन सेटिंग्स, और ऐसे परिदृश्य जहाँ स्पष्ट, मिनिमल कॉन्फ़िगरेशन फ़ाइलें आवश्यक हों।
तकनीकी विवरण
TOML key-value pairs, tables ([section]), arrays of tables ([[array]]), inline tables और typed values (string, integer, float, boolean, datetime, array) को सपोर्ट करता है। # से कमेंट्स। RFC 3339 datetime फॉर्मेट। YAML/JSON के विपरीत, TOML स्पेसिफ़िकेशन अस्पष्टता-मुक्त होने का लक्ष्य रखती है।
इतिहास
Tom Preston-Werner (GitHub सह-संस्थापक) ने 2013 में TOML बनाया। TOML v1.0.0 (2021) ने इसे स्थिर किया। Rust के Cargo ने शुरू से TOML अपनाया। Python PEP 518 (2017) ने pyproject.toml को मानकीकृत किया। Hugo, Netlify और अनेक DevOps टूल TOML का उपयोग करते हैं।