Skip to content

Releases: ijl/orjson

3.1.0

08 Jun 13:26
@ijl ijl
Compare
Choose a tag to compare

Added

  • orjson.OPT_PASSTHROUGH_SUBCLASS causes orjson.dumps() to pass
    subclasses of builtin types to default so the caller can customize the
    output.
  • orjson.OPT_PASSTHROUGH_DATETIME causes orjson.dumps() to pass
    datetime objects to default so the caller can customize the
    output.

3.0.2

27 May 14:27
@ijl ijl
Compare
Choose a tag to compare

Changed

  • orjson.dumps() does not serialize dataclasses.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 serialize dataclasses.dataclass attributes that
    are InitVar or ClassVar whether using __slots__ or not.

3.0.1

19 May 14:06
@ijl ijl
Compare
Choose a tag to compare

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
    while orjson.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

01 May 14:38
@ijl ijl
Compare
Choose a tag to compare

Added

  • orjson.dumps() serializes subclasses of str, int, list, and dict.

Changed

  • orjson.dumps() serializes dataclasses.dataclass and uuid.UUID
    instances by default. The options OPT_SERIALIZE_DATACLASS and
    OPT_SERIALIZE_UUID can still be specified but have no effect.

2.6.8

30 Apr 13:46
@ijl ijl
Compare
Choose a tag to compare

Changed

  • The source distribution vendors a forked dependency.

2.6.7

30 Apr 12:27
@ijl ijl
Compare
Choose a tag to compare

Fixed

  • Fix integer overflows in debug builds.

Changed

  • The source distribution sets the recommended RUSTFLAGS in .cargo/config.

2.6.6

24 Apr 01:06
@ijl ijl
Compare
Choose a tag to compare

Fixed

  • Import numpy only on first use of OPT_SERIALIZE_NUMPY to reduce
    interpreter start time when not used.
  • Reduce build time by half.

2.6.5

08 Apr 17:05
@ijl ijl
Compare
Choose a tag to compare

Fixed

  • Fix deserialization raising JSONDecodeError on some valid negative
    floats with large exponents.

2.6.4

08 Apr 13:23
@ijl ijl
Compare
Choose a tag to compare

Changed

  • Improve deserialization performance of floats by about 40%.

2.6.3

01 Apr 22:50
@ijl ijl
Compare
Choose a tag to compare

Changed

  • Serialize enum.Enum objects.
  • Minor performance improvements.