Releases: ijl/orjson
Releases · ijl/orjson
3.1.0
Added
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 pass
datetime
objects todefault
so the caller can customize the
output.
3.0.2
Changed
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.
3.0.1
Fixed
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.
Changed
- Improve serialization performance marginally by using the fastcall/vectorcall
calling convention on python3.7 and above. - Reduce build time.
3.0.0
Added
orjson.dumps()
serializes subclasses ofstr
,int
,list
, anddict
.
Changed
orjson.dumps()
serializesdataclasses.dataclass
anduuid.UUID
instances by default. The optionsOPT_SERIALIZE_DATACLASS
and
OPT_SERIALIZE_UUID
can still be specified but have no effect.