Skip to content
TaskBionics

How to fix "Expecting property name enclosed in double quotes" in apps, APIs, config files

json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes

What this error means

A key is unquoted or uses single quotes — valid in JavaScript or Python, not in JSON.

Why it happens

  • Python dict printed with print()
  • JavaScript object copied as JSON

How to fix it

  1. In Python, use json.dumps() instead of str() or print()
  2. Upload the file here to convert it to valid JSON

About JSON file files

JSON is strict: one stray comma or a single quote makes the whole file unreadable. Most broken JSON comes from hand edits, JavaScript objects pasted as JSON, or Python output.

Other JSON errors