- Use a faster library to serialize
float. Users with byte-exact regression tests should note positive exponents are now written using a+, e.g.,1.2e+30instead of1.2e30. Both formats are spec-compliant. - ABI compatibility with CPython 3.15 alpha 5 free-threading.
- orjson now includes code licensed under the Mozilla Public License 2.0 (MPL-2.0).
- Drop support for Python 3.9.
- ABI compatibility with CPython 3.15 alpha 5.
- Build now depends on Rust 1.89 or later instead of 1.85.
- Fix sporadic crash serializing deeply nested
listofdict.
- Show simple error message instead of traceback when attempting to build on unsupported Python versions.
- ABI compatibility with CPython 3.15 alpha 1.
- Publish PyPI wheels for 3.14 and manylinux i686, manylinux arm7, manylinux ppc64le, manylinux s390x.
- Build now requires a C compiler.
- Fix PyPI project metadata when using maturin 1.9.2 or later.
- Fix build using Rust 1.89 on amd64.
- Build now depends on Rust 1.85 or later instead of 1.82.
- Publish PyPI wheels for CPython 3.14.
- Fix
stron big-endian architectures. This was introduced in 3.11.0.
- Use a deserialization buffer allocated per request instead of a shared buffer allocated on import.
- ABI compatibility with CPython 3.14 beta 4.
- Fix incorrect escaping of the vertical tabulation character. This was introduced in 3.10.17.
- Publish PyPI Windows aarch64/arm64 wheels.
- ABI compatibility with CPython 3.14 alpha 7.
- Fix incompatibility running on Python 3.13 using WASM.
- Improve performance of serialization on amd64 machines with AVX-512.
- ABI compatibility with CPython 3.14 alpha 6.
- Drop support for Python 3.8.
- Publish additional PyPI wheels for macOS that target only aarch64, macOS 15, and recent Python.
- Publish PyPI manylinux aarch64 wheels built and tested on aarch64.
- Publish PyPI musllinux aarch64 and arm7l wheels built and tested on aarch64.
- Publish PyPI manylinux Python 3.13 wheels for i686, arm7l, ppc64le, and s390x.
- Specify build system dependency on
maturin>=1,<2again. - Allocate memory using
PyMem_Malloc()and similar APIs for integration with pymalloc, mimalloc, and tracemalloc. - Source distribution does not ship compressed test documents and relevant tests skip if fixtures are not present.
- Build now depends on Rust 1.82 or later instead of 1.72.
- Fix compatibility with maturin introducing a breaking change in 1.8.0 and specify a fixed version of maturin. Projects relying on any previous version being buildable from source by end users (via PEP 517) must upgrade to at least this version.
- Publish PyPI manylinux i686 wheels.
- Publish PyPI musllinux i686 and arm7l wheels.
- Publish PyPI macOS wheels for Python 3.10 or later built on macOS 15.
- Publish PyPI Windows wheels using trusted publishing.
- Improve performance of UUIDs.
- Publish PyPI wheels with trusted publishing and PEP 740 attestations.
- Include text of licenses for vendored dependencies.
- Fix
intserialization ons390x. This was introduced in 3.10.8.
- Publish aarch64 manylinux_2_17 wheel for 3.13 to PyPI.
- Fix
intserialization on 32-bit Python 3.8, 3.9, 3.10. This was introduced in 3.10.8.
intserialization no longer chainsOverflowErrorto the the__cause__attribute oforjson.JSONEncodeErrorwhen range exceeded.- Compatibility with CPython 3.14 alpha 1.
- Improve performance.
- Improve performance of stable Rust amd64 builds.
- Improve performance.
- Improve performance.
- Improve performance.
manylinuxamd64 builds include runtime-detected AVX-512strimplementation.- Tests now compatible with numpy v2.
- Fix crash serializing
strintroduced in 3.10.1.
- Improve performance.
- Drop support for arm7.
- Serializing
numpy.ndarraywith non-native endianness raisesorjson.JSONEncodeError.
- Improve performance of serializing.
- Support serializing
numpy.float16(numpy.half). - sdist uses metadata 2.3 instead of 2.1.
- Improve Windows PyPI builds.
- Implement recursion limit of 1024 on
orjson.loads(). - Use byte-exact read on
strformatting SIMD path to avoid crash.
- Fix crash serializing
strintroduced in 3.9.11.
- Build now depends on Rust 1.72 or later.
- Serialization
strescape uses only 128-bit SIMD. - Fix compatibility with CPython 3.13 alpha 3.
- Publish
musllinux_1_2instead ofmusllinux_1_1wheels. - Serialization uses small integer optimization in CPython 3.12 or later.
- Update benchmarks in README.
- Minimal
musllinux_1_1build due to sporadic CI failure.
- Improve performance of serializing.
stris significantly faster. Documents usingdict,list, andtupleare somewhat faster.
- Fix debug assert failure on 3.12
--profile=devbuild.
orjsonmodule metadata explicitly marks subinterpreters as not supported.
- Improve performance.
- Drop support for Python 3.7.
- Fix crash in
orjson.loads()due to non-reentrant handling of persistent buffer. This was introduced in 3.9.3. - Handle some FFI removals in CPython 3.13.
- Fix numpy reference leak on unsupported array dtype.
- Fix numpy.datetime64 reference handling.
- Minor performance improvements.
- Remove futex from module import and initialization path.
- Fix hash builder using default values.
- Fix non-release builds of orjson copying large deserialization buffer from stack to heap. This was introduced in 3.9.3.
- Fix compatibility with CPython 3.12.
- Support i686/x86 32-bit Python installs on Windows.
- Fix the
__cause__exception onorjson.JSONEncodeErrorpossibly being denormalized, i.e., of typestrinstead ofException.
- Fix memory leak on chained tracebacks of exceptions raised in
default. This was introduced in 3.8.12.
orjson.Fragmentincludes already-serialized JSON in a document.
- PyPI
manylinuxwheels are compiled forx86-64instead ofx86-64-v2.
- Source distribution contains all source code required for an offline build.
- PyPI macOS wheels use a
MACOSX_DEPLOYMENT_TARGETof 10.15 instead of 11. - Build uses maturin v1.
- Exceptions raised in
defaultare now chained as the__cause__attribute onorjson.JSONEncodeError.
orjson.loads()on an empty document has a specific error message.- PyPI
manylinux_2_28_x86_64wheels are compiled forx86-64-v2. - PyPI macOS wheels are only
universal2and compiled forx86-64-v2andapple-m1.
- Fix compatibility with CPython 3.12.0a7.
- Fix compatibility with big-endian architectures.
- Fix crash in serialization.
- Publish musllinux 3.11 wheels.
- Publish s390x wheels.
- Fix parallel initialization of orjson.
- Publish ppc64le wheels.
- Use serialization backend introduced in 3.8.4 only on well-tested platforms such as glibc, macOS by default.
- Fix crash serializing when using musl libc.
- Make
python-dateutiloptional in tests. - Handle failure to load system timezones in tests.
- Fix
orjson.dumps()invalid output on Windows.
- Improve performance.
orjson.dumps()acceptsoption=NoneperOptional[int]type.
- Fix tests on 32-bit for
numpy.intpandnumpy.uintp.
- Build now depends on rustc 1.60 or later.
- Support building with maturin 0.13 or 0.14.
- Build maintenance for Python 3.11.
- Support serializing
numpy.int16andnumpy.uint16.
- Fix datetime regression tests for tzinfo 2022b.
- Improve performance.
- Revert
dictiterator implementation introduced in 3.7.9.
- Fix serializing
dictwith deleted final item. This was introduced in 3.7.9.
- Improve performance of serializing.
- Improve performance of serializing pretty-printed (
orjson.OPT_INDENT_2) to be much nearer to compact. - Improve performance of deserializing
strinput. - orjson now requires Rust 1.57 instead of 1.54 to build.
- Build makes best effort instead of requiring "--features".
- Build using maturin 0.13.
- 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.