- Support Python 3.11.
- Handle unicode changes in CPython 3.12.
- Build PyPI macOS wheels on 10.15 instead of 12 for compatibility.
- Fix issue serializing dicts that had keys popped and replaced. This was introduced in 3.7.4.
- Improve performance.
- Fix deallocation of
orjson.JSONDecodeError.
- Improve build.
- Publish aarch64 musllinux wheels.
- Improve deserialization performance.
- Type stubs for
orjson.JSONDecodeErrornow inherit fromjson.JSONDecodeErrorinstead ofValueError - Null-terminate the internal buffer of
orjson.dumps()output.
- Improve deserialization performance significantly through the use of a new backend. PyPI wheels for manylinux_2_28 and macOS have it enabled. Packagers are advised to see the README.
- Improve serialization and deserialization performance.
- Fix serialization of
numpy.datetime64("NaT")to raise on an unsupported type.
- Improve performance of deserializing almost-empty documents.
- Publish arm7l
manylinux_2_17wheels to PyPI. - Publish amd4
musllinux_1_1wheels to PyPI.
- Fix build requiring
pythononPATH.
- Improve performance of serializing
datetime.datetimeusingtzinfothat arezoneinfo.ZoneInfo.
- Fix invalid indexing in line and column number reporting in
JSONDecodeError. - Fix
orjson.OPT_STRICT_INTEGERnot raising an error on values exceeding a 64-bit integer maximum.
- Fix build on macOS aarch64 CPython 3.10.
- Fix build issue on 32-bit.
- Fix serialization of
dataclassinheriting fromabc.ABCand using__slots__. - Decrement refcount for numpy
PyArrayInterface. - Fix build on recent versions of Rust nightly.
- Fix build on aarch64 using the Rust stable channel.
orjsonnow compiles on Rust stable 1.54.0 or above. Use of some SIMD usage is now disabled by default and packagers are advised to add--cargo-extra-args="--features=unstable-simd"to thematurin buildcommand if they continue to use nightly.orjsonbuilt with--features=unstable-simdadds UTF-8 validation implementations that use AVX2 or SSE4.2.- Drop support for Python 3.6.
orjsonnow includes apyitype stubs file.- Publish manylinux_2_24 wheels instead of manylinux2014.
- Fix compilation on latest Rust nightly.
orjson.dumps()serializesnumpy.datetime64instances as RFC 3339 strings.
- Fix memory leak serializing
datetime.datetimewithtzinfo. - Fix wrong error message when serializing an unsupported numpy type without default specified.
- Publish python3.10 and python3.9 manylinux_2_24 wheels.
orjson.JSONDecodeErrornow haspos,lineno, andcolno.- Fix build on recent versions of Rust nightly.
- Improve serialization and deserialization performance.
orjson.dumps()serializes individualnumpy.bool_objects.
- Publish
universal2wheels for macOS supporting Apple Silicon (aarch64).
orjson.loads()supports reading frommemoryviewobjects.
datetime.datetimeanddatetime.datezero pad years less than 1000 to four digits.- sdist pins maturin 0.9.0 to avoid breaks in later 0.9.x.
orjson.dumps()when given a non-C contiguousnumpy.ndarrayhas an error message suggesting to usedefault.
- aarch64 manylinux2014 wheels are now compatible with glibc 2.17.
- Fix build warnings on ppcle64.
- Use vectorcall APIs for method calls on python3.9 and above.
- Publish python3.10 wheels for Linux on amd64 and aarch64.
- Fix compatibility with debug builds of CPython.
- Fix deserializing long strings on processors without AVX2.
orjson.dumps()serializes integers up to a 64-bit unsigned integer's maximum. It was previously the maximum of a 64-bit signed integer.
- Fix regression in parsing similar
dictkeys.
- Improve deserialization performance.
- Publish Windows python3.9 wheel.
- Disable unsupported SIMD features on non-x86, non-ARM targets
- Fix
orjson.dumps.__module__andorjson.loads.__module__not being thestr"orjson".
- Publish macos python3.9 wheel.
- More packaging documentation.
- Serialize
numpy.uint8andnumpy.int8instances.
- Fix serializing
numpy.empty()instances.
- No longer publish
manylinux1wheels due to tooling dropping support.
- Fix failure to deserialize some latin1 strings on some platforms. This was introduced in 3.2.0.
- Fix annotation of optional parameters on
orjson.dumps()forhelp().
- Publish
manylinux2014wheels for amd64 in addition tomanylinux1.
orjson.dumps()now serializes individual numpy floats and integers, e.g.,numpy.float64(1.0).orjson.OPT_PASSTHROUGH_DATACLASScausesorjson.dumps()to passdataclasses.dataclassinstances todefault.
- Fix serializing
dataclasses.dataclassthat have no attributes.
- Improve deserialization performance of
str.
- Fix
orjson.dumps(..., **{})raisingTypeErroron python3.6.
orjson.OPT_APPEND_NEWLINEappends a newline to output.
- Improve deserialization performance of
str.
- Fix serializing zero-dimension
numpy.ndarray.
- Fix repeated serialization of
strthat are ASCII-only and have a legacy (non-compact) layout.
orjson.OPT_PASSTHROUGH_SUBCLASScausesorjson.dumps()to pass subclasses of builtin types todefaultso the caller can customize the output.orjson.OPT_PASSTHROUGH_DATETIMEcausesorjson.dumps()to passdatetimeobjects todefaultso the caller can customize the output.
orjson.dumps()does not serializedataclasses.dataclassattributes that begin with a leading underscore, e.g.,_attr. This is because of the Python idiom that a leading underscores marks an attribute as "private."orjson.dumps()does not serializedataclasses.dataclassattributes that areInitVarorClassVarwhether using__slots__or not.
orjson.dumps()raises an exception if the object to be serialized is not given as a positional argument.orjson.dumps({})is intended and ok whileorjson.dumps(obj={})is an error. This makes it consistent with the documentation,help()annotation, and type annotation.- Fix orphan reference in exception creation that leaks memory until the garbage collector runs.
- Improve serialization performance marginally by using the fastcall/vectorcall calling convention on python3.7 and above.
- Reduce build time.
orjson.dumps()serializes subclasses ofstr,int,list, anddict.
orjson.dumps()serializesdataclasses.dataclassanduuid.UUIDinstances by default. The optionsOPT_SERIALIZE_DATACLASSandOPT_SERIALIZE_UUIDcan still be specified but have no effect.
- The source distribution vendors a forked dependency.
- Fix integer overflows in debug builds.
- The source distribution sets the recommended RUSTFLAGS in
.cargo/config.
- Import
numpyonly on first use ofOPT_SERIALIZE_NUMPYto reduce interpreter start time when not used. - Reduce build time by half.
- Fix deserialization raising
JSONDecodeErroron some valid negative floats with large exponents.
- Improve deserialization performance of floats by about 40%.
- Serialize
enum.Enumobjects. - Minor performance improvements.
- Publish python3.9
manylinux2014wheel instead ofmanylinux1forx86_64. - Publish python3.9
manylinux2014wheel foraarch64.
- Fix compilation failure on 32-bit.
- Serialization is 10-20% faster and uses about 50% less memory by writing
directly to the returned
bytesobject.
orjson.dumps()pretty prints with an indentation of two spaces ifoption=orjson.OPT_INDENT_2is specified.
- Publish
manylinux2014wheels foraarch64. - numpy support now includes
numpy.uint32andnumpy.uint64.
manylinux1wheels for 3.6, 3.7, and 3.8 are now compliant with the spec by not depending on glibc 2.18.
orjson.dumps()serializesdictkeys of type other thanstrifoption=orjson.OPT_NON_STR_KEYSis specified.
orjson.dumps()serializesnumpy.ndarrayinstances ifoption=orjson.OPT_SERIALIZE_NUMPYis specified.
- Fix
dataclasses.dataclassattributes that aredictto be effected byorjson.OPT_SORT_KEYS.
orjson.dumps()serializesdictinstances sorted by keys, equivalent tosort_keysin other implementations, ifoption=orjson.OPT_SORT_KEYSis specified.
dataclasses.dataclassinstances without__slots__now serialize faster.
- Fix documentation on
default, in particular documenting the need to raise an exception if the type cannot be handled.
- Performance improvements to serializing a list containing elements of the same type.
orjson.loads()rejects floats that do not have a digit following the decimal, e.g.,-2.,2.e-3.
- Build Linux, macOS, and Windows wheels on more recent distributions.
orjson.dumps()serializesuuid.UUIDinstances ifoption=orjson.OPT_SERIALIZE_UUIDis specified.
- Minor performance improvements.
- Publish Python 3.9 wheel for Linux.
- Specify a text signature for
orjson.loads().
- Improve documentation.
- Publish Python 3.8 wheels for macOS and Windows.
- The recursion limit of
defaultonorjson.dumps()has been increased from 5 to 254.
- Publish
manylinux1wheels instead ofmanylinux2010.
orjson.dumps()serializesdataclasses.dataclassinstances ifoption=orjson.OPT_SERIALIZE_DATACLASSis specified.orjson.dumps()acceptsorjson.OPT_UTC_Zto serialize UTC as "Z" instead of "+00:00".orjson.dumps()acceptsorjson.OPT_OMIT_MICROSECONDSto not serialize themicrosecondsattribute ofdatetime.datetimeanddatetime.timeinstances.orjson.loads()acceptsbytearray.
- Drop support for Python 3.5.
- Publish
manylinux2010wheels instead ofmanylinux1.
- Publish Python 3.8 wheel for Linux.
- Performance improvements and lower memory usage in deserialization
by creating only one
strobject for repeated map keys.
- Minor performance improvements.
- Fix inaccurate zero padding in serialization of microseconds on
datetime.timeobjects.
- Fix inaccurate zero padding in serialization of microseconds on
datetime.datetimeobjects.
- Publish PEP 517 source distribution.
orjson.dumps()raisesJSONEncodeErroron circular references.
- Performance improvements.
- Fix inaccuracy in deserializing some
floatvalues, e.g., 31.245270191439438 was parsed to 31.24527019143944. Serialization was unaffected.
orjson.dumps()now serializesdatetime.datetimeobjects without atzinforather than raisingJSONEncodeError.
orjson.loads()uses SSE2 to validatebytesinput.
- Support Python 3.5.
- Publish Windows wheel.
orjson.dumps()accepts adefaultcallable to serialize arbitrary types.orjson.dumps()acceptsdatetime.datetime,datetime.date, anddatetime.time. Each is serialized to an RFC 3339 string.orjson.dumps(..., option=orjson.OPT_NAIVE_UTC)allows serializingdatetime.datetimeobjects that do not have a timezone set as UTC.orjson.dumps(..., option=orjson.OPT_STRICT_INTEGER)available to raise an error on integer values outside the 53-bit range of all JSON implementations.
orjson.dumps()no longer acceptsbytes.
- Handle invalid UTF-8 in str.
- Performance improvements of 15-25% on serialization, 10% on deserialization.
- Fix memory leak in deserializing dict.
- Performance improvements.
- Performance improvements.
- Dict key can only be str.
- pyo3 bugfix update.
orjson.dumps()function.orjson.loads()function.