Skip to content

Conversation

fhaeuser
Copy link

@fhaeuser fhaeuser commented Mar 3, 2025

Orjson is noticably faster than ujson, according to multiple benchmarks found online.

Orjson is noticably faster than ujson, according to multiple benchmarks
found online.
Copy link
Owner

@tcalmant tcalmant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are passing locally, CI has to be reconfigured.

Thanks for your contribution

@tcalmant tcalmant merged commit 6b5542a into tcalmant:master Mar 3, 2025
0 of 6 checks passed
@tcalmant
Copy link
Owner

tcalmant commented Mar 3, 2025

Included in release v0.4.3.4

@fhaeuser
Copy link
Author

fhaeuser commented Mar 5, 2025

I wondered about this breaking things for users, which already had orjson installed, but using non-string-keys for dicts, which throws a TypeError.
There is an orjson option OPT_NON_STR_KEYS, which can be specified for allowing other keys to be more in line with stdlib.

@tcalmant
Copy link
Owner

tcalmant commented Mar 5, 2025

According to the JSON spec, objects can only have strings as keys. I suppose we can consider that it is expected that queries will fail if non-string keys are used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants