We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The call json5.dumps({'': 'value'}) fails as shown:
json5.dumps({'': 'value'})
>>> json5.dumps({'': 'value'}) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/fornwall/src/pyjson5/json5/lib.py", line 232, in dumps _, v = _dumps(obj, skipkeys, ensure_ascii, check_circular, File "/Users/fornwall/src/pyjson5/json5/lib.py", line 304, in _dumps s = _dump_dict(obj, skipkeys, ensure_ascii, File "/Users/fornwall/src/pyjson5/json5/lib.py", line 342, in _dump_dict valid_key, key_str = _dumps(key, skipkeys, ensure_ascii, check_circular, File "/Users/fornwall/src/pyjson5/json5/lib.py", line 253, in _dumps if (is_key and _is_ident(obj) and not quote_keys File "/Users/fornwall/src/pyjson5/json5/lib.py", line 442, in _is_ident if not _is_id_start(k[0]) and k[0] not in (u'$', u'_'): IndexError: string index out of range
It should behave as the json module:
json
>>> json.dumps({'': 'value'}) '{"": "value"}'
The text was updated successfully, but these errors were encountered:
I've also pushed v0.9.4 to pypi to include this fix. Thanks again!
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
The call
json5.dumps({'': 'value'})
fails as shown:It should behave as the
json
module:The text was updated successfully, but these errors were encountered: