JSON
JSON Repair
إصلاح JSON التالف — فواصل زائدة، علامات اقتباس مفردة، مفاتيح بدون علامات اقتباس، تعليقات، قيم Python الحرفية (True/False/None) والمزيد — مع قائمة بجميع الإصلاحات المطبقة.
Data that claims to be JSON often has small deviations from the spec: a trailing comma, single quotes, unquoted keys, Python literals like True/False/None instead of true/false/null. This tool fixes such issues automatically and lists every fix it applied.
How to use it
- Paste broken JSON and the tool immediately tries to fix syntax issues and shows the valid result.
- The list below shows each applied fix separately, so you can check exactly what changed.
- If it can't be repaired (the structure is too damaged), the tool points to the exact line where parsing stopped.
Common uses
- Fixing JSON copied from logs or a console, where strings may have been truncated or escaped incorrectly.
- Converting a Python-style dict (with True/False/None and single quotes) into valid JSON.
- Parsing an LLM response that promised JSON but added a comment or a stray comma.
Things to keep in mind
The tool only fixes syntax errors — it won't catch a broken data structure (a missing field, swapped values), since that kind of JSON is still syntactically valid.
If the damage is severe enough (a string cut off mid-way, for example), the automatic fix can produce an unexpected result — always check the output before using it.
مقالة عن هذه الأداة: JSON Repair: لماذا يتعطّل JSON وكيف يُصلَح
الأسئلة الشائعة
ما أنواع الأخطاء التي يمكن للأداة إصلاحها؟
فواصل زائدة، علامات اقتباس مفردة بدلًا من مزدوجة، مفاتيح بلا علامات اقتباس، تعليقات غير مدعومة في JSON، قيم Python الحرفية مثل True/False/None، وفواصل أو نقطتين مفقودة، من بين إصلاحات أخرى.
هل يمكن للأداة إصلاح أي JSON تالف مهما كان؟
لا، بعض المدخلات التالفة بشدة — مثل نص مقتطع في منتصف قيمة — قد لا يكون لها إصلاح واحد لا لبس فيه، وفي هذه الحالة قد يتعذر على الأداة استرجاع البيانات الأصلية.
هل ترى الأداة أو تُرسل JSON الذي ألصقه؟
لا، عملية الإصلاح بأكملها تتم محليًا داخل متصفحك عبر JavaScript، ولا يُرفع أي محتوى لأي خادم.
ماذا أفعل إذا بدت نتيجة الإصلاح غير صحيحة؟
راجع النتيجة دائمًا يدويًا، خاصة في مواضع الانقطاع. الإصلاح التلقائي يعتمد افتراض «الأقل تخريبًا» (مثلًا مجرد إغلاق الأقواس المفتوحة)، لكنه لا يستطيع تخمين القيمة المقصودة إذا كانت البيانات تالفة بشكل خطير.
هل تصلح الأداة الأخطاء المنطقية في البيانات؟
لا، فقط الأخطاء النحوية. إذا كان حقل كامل مفقودًا أو قيمة في مكان خاطئ (لكن JSON نفسه صحيح نحويًا)، لن تكتشف الأداة ذلك — فهذا ليس خطأ صياغة.