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
[type(i) for i in a] Out[109]: [sqlalchemy.sql.elements.quoted_name, sqlalchemy.sql.elements.quoted_name, sqlalchemy.sql.elements.quoted_name, sqlalchemy.sql.elements.quoted_name, sqlalchemy.sql.elements.quoted_name, sqlalchemy.sql.elements.quoted_name] a Out[110]: {'id': 339, 'manualId': 'n_lje', 'name': '年度_累积额', 'description': '年度累计额', 'envs': '', 'rule_type': ''} ujson.dumps(a) Out[111]: '{"id":339,"manualId":"n_lje","name":"\u5e74\u5ea6_\u7d2f\u79ef\u989d","description":"\u5e74\u5ea6\u7d2f\u8ba1\u989d","envs":"","rule_type":""}' orjson.dumps(a) Traceback (most recent call last): File "C:\Program Files\Python38\Lib\site-packages\IPython\core\interactiveshell.py", line 3457, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in orjson.dumps(a) TypeError: Dict key must be str json.dumps(a) Out[113]: '{"id": 339, "manualId": "n_lje", "name": "\u5e74\u5ea6_\u7d2f\u79ef\u989d", "description": "\u5e74\u5ea6\u7d2f\u8ba1\u989d", "envs": "", "rule_type": ""}' issubclass(quoted_name, str) Out[114]: True
The text was updated successfully, but these errors were encountered:
Bump, facing a similar issue with sqlalchemy.sql.elements.quoted_name. I don't know one iota of Rust, but I wonder if this check here:
sqlalchemy.sql.elements.quoted_name
orjson/src/serialize/dict.rs
Line 73 in acaecd2
could be made so it checks if the key is a subclass of string.
Sorry, something went wrong.
format_message
No branches or pull requests
[type(i) for i in a]
Out[109]:
[sqlalchemy.sql.elements.quoted_name,
sqlalchemy.sql.elements.quoted_name,
sqlalchemy.sql.elements.quoted_name,
sqlalchemy.sql.elements.quoted_name,
sqlalchemy.sql.elements.quoted_name,
sqlalchemy.sql.elements.quoted_name]
a
Out[110]:
{'id': 339,
'manualId': 'n_lje',
'name': '年度_累积额',
'description': '年度累计额',
'envs': '',
'rule_type': ''}
ujson.dumps(a)
Out[111]: '{"id":339,"manualId":"n_lje","name":"\u5e74\u5ea6_\u7d2f\u79ef\u989d","description":"\u5e74\u5ea6\u7d2f\u8ba1\u989d","envs":"","rule_type":""}'
orjson.dumps(a)
Traceback (most recent call last):
File "C:\Program Files\Python38\Lib\site-packages\IPython\core\interactiveshell.py", line 3457, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
orjson.dumps(a)
TypeError: Dict key must be str
json.dumps(a)
Out[113]: '{"id": 339, "manualId": "n_lje", "name": "\u5e74\u5ea6_\u7d2f\u79ef\u989d", "description": "\u5e74\u5ea6\u7d2f\u8ba1\u989d", "envs": "", "rule_type": ""}'
issubclass(quoted_name, str)
Out[114]: True
The text was updated successfully, but these errors were encountered: