ตัวจัดรูปแบบและโค้ด
ตัวจัดรูปแบบ JSON5
ตัวจัดรูปแบบ JSON5 ฟรี ยอมรับ JSON ที่มีความคิดเห็น, เครื่องหมายจุลภาคปิดท้าย และไวยากรณ์ที่ผ่อนปรนอื่นๆ จากนั้นส่งออก JSON ที่เข้มงวด มีประโยชน์สำหรับไฟล์คอนฟิกที่เบี่ยงเบนจาก Spec
หมายเหตุจากบรรณาธิการ
Understanding · JSON for humans.
บทเชิงลึกนี้มีให้บริการเฉพาะภาษาอังกฤษในขณะนี้ เครื่องมือแปลงด้านบนทำงานในภาษาของคุณ บทความอธิบายแบบยาวยังไม่ได้แปล
คำถามที่พบบ่อย
Quick answers.
›What is JSON5?
A superset of JSON that allows comments, trailing commas, unquoted keys and a few other conveniences. It's the format of many config files (tsconfig, devcontainer, babel) and drift-prone hand-edited JSON.
›Does it handle single-quoted strings?
This tool handles the most common JSON5 drift — `// comments`, `/* block comments */` and trailing commas. For the full JSON5 spec (unquoted keys, single quotes, hex numbers) paste into a proper JSON5 parser locally.
›What does the output look like?
Strict, spec-compliant JSON — 2-space indented. Safe to feed to any JSON.parse or schema validator.
›Is it free?
Yes — fully free, in-browser, no signup.
ผู้คนยังค้นหา
เครื่องมือที่เกี่ยวข้อง
More in this room.
- JSON Formatter & Validatorจัดรูปแบบ, ย่อขนาดและตรวจสอบ JSON — ฟรี, ไม่ต้องลงทะเบียน
- SQL Formatterจัดรูปแบบและจัดย่อหน้าคำสั่ง SQL ที่ไม่สวยงาม
- XML Formatter & Validatorจัดรูปแบบ, ย่อขนาดและตรวจสอบ XML — ทันที
- HTML Formatterจัดรูปแบบและย่อขนาด HTML — ค่าเริ่มต้นของ Prettier
- CSS Formatterจัดรูปแบบและย่อขนาดสไตล์ชีท CSS
- JavaScript / TypeScript FormatterJS & TS ที่จัดรูปแบบด้วย Prettier ในเบราว์เซอร์