The converter parses JSON, then formats the object with stringifyPyDict. JSON null, true, and false become Python None, True, and False, while arrays and nested objects are rendered as Python-style lists and dictionaries.
Choose curly braces for general-purpose dictionary literals, or dict() mode for simple keyword-style examples. In curly mode, the key quote option lets you match projects that prefer single or double quoted dictionary keys.
Common questions and answers about this topic.
JSON is a text-based data interchange format that uses null, true/false, and requires double-quoted keys. Python dictionaries are in-memory data structures that use None, True/False, support single or double quotes, and allow non-string keys like integers and tuples.
Curly brace output uses the standard {'key': 'value'} syntax, which is the most common Python dict format. The dict() constructor output uses dict(key='value') syntax, which can be more readable for simple string keys but does not support keys with spaces or non-string keys.
Yes, you can choose between single quotes ('key') and double quotes ("key") for dictionary keys. This lets you match the quoting convention used in your project's codebase.
No, the JSON to Python dict conversion happens entirely in your browser. Your JSON data is transformed locally via JavaScript and never leaves your device.