- Fix regression in parsing similar
dict
keys.
- 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.uint8
andnumpy.int8
instances.
- Fix serializing
numpy.empty()
instances.
- No longer publish
manylinux1
wheels 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
manylinux2014
wheels for amd64 in addition tomanylinux1
.
orjson.dumps()
now serializes individual numpy floats and integers, e.g.,numpy.float64(1.0)
.orjson.OPT_PASSTHROUGH_DATACLASS
causesorjson.dumps()
to passdataclasses.dataclass
instances todefault
.
- Fix serializing
dataclasses.dataclass
that have no attributes.
- Improve deserialization performance of
str
.
- Fix
orjson.dumps(..., **{})
raisingTypeError
on python3.6.
orjson.OPT_APPEND_NEWLINE
appends a newline to output.
- Improve deserialization performance of
str
.
- Fix serializing zero-dimension
numpy.ndarray
.
- Fix repeated serialization of
str
that are ASCII-only and have a legacy (non-compact) layout.
orjson.OPT_PASSTHROUGH_SUBCLASS
causesorjson.dumps()
to pass subclasses of builtin types todefault
so the caller can customize the output.orjson.OPT_PASSTHROUGH_DATETIME
causesorjson.dumps()
to passdatetime
objects todefault
so the caller can customize the output.
orjson.dumps()
does not serializedataclasses.dataclass
attributes 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.dataclass
attributes that areInitVar
orClassVar
whether 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.dataclass
anduuid.UUID
instances by default. The optionsOPT_SERIALIZE_DATACLASS
andOPT_SERIALIZE_UUID
can 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
numpy
only on first use ofOPT_SERIALIZE_NUMPY
to reduce interpreter start time when not used. - Reduce build time by half.
- Fix deserialization raising
JSONDecodeError
on some valid negative floats with large exponents.
- Improve deserialization performance of floats by about 40%.
- Serialize
enum.Enum
objects. - Minor performance improvements.
- Publish python3.9
manylinux2014
wheel instead ofmanylinux1
forx86_64
. - Publish python3.9
manylinux2014
wheel foraarch64
.
- Fix compilation failure on 32-bit.
- Serialization is 10-20% faster and uses about 50% less memory by writing
directly to the returned
bytes
object.
orjson.dumps()
pretty prints with an indentation of two spaces ifoption=orjson.OPT_INDENT_2
is specified.
- Publish
manylinux2014
wheels foraarch64
. - numpy support now includes
numpy.uint32
andnumpy.uint64
.
manylinux1
wheels for 3.6, 3.7, and 3.8 are now compliant with the spec by not depending on glibc 2.18.
orjson.dumps()
serializesdict
keys of type other thanstr
ifoption=orjson.OPT_NON_STR_KEYS
is specified.
orjson.dumps()
serializesnumpy.ndarray
instances ifoption=orjson.OPT_SERIALIZE_NUMPY
is specified.
- Fix
dataclasses.dataclass
attributes that aredict
to be effected byorjson.OPT_SORT_KEYS
.
orjson.dumps()
serializesdict
instances sorted by keys, equivalent tosort_keys
in other implementations, ifoption=orjson.OPT_SORT_KEYS
is specified.
dataclasses.dataclass
instances 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.UUID
instances ifoption=orjson.OPT_SERIALIZE_UUID
is 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
default
onorjson.dumps()
has been increased from 5 to 254.
- Publish
manylinux1
wheels instead ofmanylinux2010
.
orjson.dumps()
serializesdataclasses.dataclass
instances ifoption=orjson.OPT_SERIALIZE_DATACLASS
is specified.orjson.dumps()
acceptsorjson.OPT_UTC_Z
to serialize UTC as "Z" instead of "+00:00".orjson.dumps()
acceptsorjson.OPT_OMIT_MICROSECONDS
to not serialize themicroseconds
attribute ofdatetime.datetime
anddatetime.time
instances.orjson.loads()
acceptsbytearray
.
- Drop support for Python 3.5.
- Publish
manylinux2010
wheels instead ofmanylinux1
.
- Publish Python 3.8 wheel for Linux.
- Performance improvements and lower memory usage in deserialization
by creating only one
str
object for repeated map keys.
- Minor performance improvements.
- Fix inaccurate zero padding in serialization of microseconds on
datetime.time
objects.
- Fix inaccurate zero padding in serialization of microseconds on
datetime.datetime
objects.
- Publish PEP 517 source distribution.
orjson.dumps()
raisesJSONEncodeError
on circular references.
- Performance improvements.
- Fix inaccuracy in deserializing some
float
values, e.g., 31.245270191439438 was parsed to 31.24527019143944. Serialization was unaffected.
orjson.dumps()
now serializesdatetime.datetime
objects without atzinfo
rather than raisingJSONEncodeError
.
orjson.loads()
uses SSE2 to validatebytes
input.
- Support Python 3.5.
- Publish Windows wheel.
orjson.dumps()
accepts adefault
callable 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.datetime
objects 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.