อินพุต YAML
JSON
ไม่มีข้อมูล
เกี่ยวกับเครื่องมือนี้
YAML Viewer เป็นเครื่องมือสำคัญสำหรับทุกคนที่ทำงานกับไฟล์คอนฟิก YAML ในยุค DevOps โครงสร้างพื้นฐานคลาวด์ และการพัฒนาแอปพลิเคชันสมัยใหม่ ฉันใช้เครื่องมือนี้ทุกวันในการดีบัก Kubernetes manifests, Docker Compose, GitHub Actions workflows, Ansible playbooks และไฟล์คอนฟิกต่าง ๆ มุมมองแบบ Tree View แบบอินเทอร์แอคทีฟช่วยให้เข้าใจโครงสร้างซ้อนที่ซับซ้อนได้ในพริบตา—ขยาย/ยุบโหนดเพื่อโฟกัสแต่ละส่วน ดูชนิดข้อมูล (string, number, boolean, array, object) ได้ชัดเจน และนำทางไฟล์ YAML ขนาดใหญ่ได้อย่างรวดเร็วโดยไม่หลงกับการเยื้อง ฟีเจอร์แปลงเป็น JSON มีประโยชน์มากสำหรับการตรวจสอบไวยากรณ์ YAML และดูว่าข้อมูลจะถูกแปลความอย่างไรโดย parser การตรวจสอบไวยากรณ์จะจับข้อผิดพลาดก่อนนำไปใช้งานจริง—เช่น ลืมใส่โคลอน การเยื้องผิด anchor ไม่ถูกต้อง หรือ array ผิดรูปแบบจะแสดงตำแหน่งบรรทัดและคอลัมน์อย่างแม่นยำ
วิธีใช้งาน
วางหรืออัปโหลดเนื้อหา YAML ของคุณลงในแผงอินพุต เครื่องมือนี้จะวิเคราะห์และตรวจสอบ YAML แบบเรียลไทม์โดยอัตโนมัติ ใช้แท็บโหมดมุมมองเพื่อสลับระหว่าง Tree View (แผนผังแบบอินเทอร์แอคทีฟ), JSON (ดู YAML ที่แปลงเป็น JSON) และ YAML (ผลลัพธ์ YAML ที่จัดรูปแบบและตรวจสอบแล้ว) ในโหมด Tree View คลิกที่โหนดใด ๆ เพื่อขยาย/ยุบโครงสร้างซ้อน—ใช้ปุ่ม 'ขยายทั้งหมด' และ 'ยุบทั้งหมด' เพื่อช่วยนำทางไฟล์ขนาดใหญ่ ข้อผิดพลาดไวยากรณ์ใด ๆ จะแสดงอย่างชัดเจนพร้อมข้อความอธิบายที่ละเอียด รวมถึงหมายเลขบรรทัดและคอลัมน์ คุณสามารถอัปโหลดไฟล์ YAML ได้โดยตรง (รองรับ .yaml, .yml และ .txt) และจะแสดงชื่อไฟล์เพื่ออ้างอิง คัดลอก JSON หรือ YAML ที่จัดรูปแบบไปยังคลิปบอร์ด หรือดาวน์โหลดข้อมูลที่แปลงแล้วได้
กรณีการใช้งานทั่วไป
Kubernetes Debugging
Paste complex K8s deployment YAML and use tree view to verify nested spec.containers.env variables, volume mounts, or resource limits structure.
Docker Compose Validation
Check docker-compose.yml syntax before running 'docker-compose up'—catch indentation errors or invalid service configurations.
GitHub Actions Review
Visualize complex workflow YAML with multiple jobs and conditional steps in an easy-to-navigate tree structure.
Config File Analysis
Parse large application configuration files (Helm charts, Ansible playbooks, OpenAPI specs) to understand the structure without reading hundreds of lines.
YAML to JSON Conversion
Convert YAML config to JSON for use with tools that only accept JSON input (many APIs and CLI tools).
Learning YAML
Use the tree view to understand how YAML indentation maps to nested data structures and how YAML anchors/aliases work.
ข้อจำกัดและหมายเหตุสำคัญ
Very large YAML files (>5MB) may cause browser performance issues—for massive files, use command-line tools like yq or yaml-lint. The tool uses JavaScript YAML parser which follows YAML 1.2 spec—some YAML 1.1 features may parse differently. Custom YAML tags (!include, !env, !ref) are not supported as these are preprocessor features requiring external file access. Comments in YAML are preserved in the input display but not included in JSON/tree output (JSON doesn't support comments). For Kubernetes-specific validation (CRD schemas, API versions), use kubectl --dry-run instead. Multi-document YAML files (separated by ---) show only the first document—split multi-doc files for individual viewing. Binary data in YAML (base64 encoded) is shown as-is without decoding.