orjson
orjson copied to clipboard
Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy
This is a rebase of #438, which was closed as stale. ``` When using passing a dict with OPT_NON_STR_KEYS, if the object type is Unknown, add a fallback to use...
This is from system dmesg output: `[Fri Jan 19 10:41:06 2024] python3[3421008]: segfault at 7fe28bd24000 ip 00007fe296824bde sp 00007ffdd5db46f8 error 4 in orjson.cpython-312-x86_64-linux-gnu.so[7fe2967fe000+2f000] [Fri Jan 19 10:41:06 2024] Code: 66...
Consider this code: ```py import orjson orjson.dumps(orjson.loads("2800000000000000000"), option=orjson.OPT_STRICT_INTEGER) ``` This will fail, which is currently the expected behavior. The value is deserialized to `int(2800000000000000000)`, which is `>= 2 ** 53`,...
[freezegun](https://github.com/spulec/freezegun) is a utility library commonly used in testing to control the time. In doing so it causes the `datetime` library to produce fake types. Although these types correctly identify...
- previous version 3.9.15 did not appear to have the issue - no reproducer available yet (sorry) - only seems to happen during serialize - orjson.Fragment is being used, but...
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account. - `python3 -sBm...
Any suggestions? ``` error[E0560]: struct `pyo3_ffi::PyTypeObject` has no field named `tp_weaklist` --> src/ffi/fragment.rs:100:9 | 100 | tp_weaklist: null_mut(), | ^^^^^^^^^^^ field does not exist | ::: /tmp/pip-install-obf5br_g/orjson_b7afd63f19ea4426abbc28b336b48cc2/include/cargo/pyo3-ffi-0.21.2/src/object.rs:7:16 | 7 |...
Unlike `json.dumps`, `orjson.dumps` does not release memory, resulting in a much higher memory usage
## Search you tried in the issue tracker "memory" There is a range of different issues about memory usage, but all of them are either closed as "fixed" or as...
Both the official json library and UltraJSON support these two functions, and I think orjson should also support them. I found a related issue #329, but it seems that these...