Skip to content

Commit 142e1a9

Browse files
committed
2.3.0
1 parent a1c9153 commit 142e1a9

4 files changed

Lines changed: 21 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Changelog
22

3+
## 2.3.0 - 2020-02-12
4+
5+
### Added
6+
7+
- `orjson.dumps()` serializes `dict` instances sorted by keys, equivalent to
8+
`sort_keys` in other implementations, if `option=orjson.OPT_SORT_KEYS` is
9+
specified.
10+
11+
### Changed
12+
13+
- `dataclasses.dataclass` instances without `__slots__` now serialize faster.
14+
15+
### Fixed
16+
17+
- Fix documentation on `default`, in particular documenting the need to raise
18+
an exception if the type cannot be handled.
19+
320
## 2.2.2 - 2020-02-10
421

522
### Changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "orjson"
3-
version = "2.2.2"
3+
version = "2.3.0"
44
authors = ["ijl <ijl@mailbox.org>"]
55
description = "Fast, correct Python JSON library supporting dataclasses and datetimes"
66
edition = "2018"

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ libraries
2424
support for 64-bit
2525
* does not support subclasses by default, requiring use of `default` hook
2626
* does not support pretty printing
27-
* does not support sorting `dict` by keys
2827
* does not provide `load()` or `dump()` functions for reading from/writing to
2928
file-like objects
3029

@@ -222,7 +221,8 @@ Serialize `uuid.UUID` instances. For more, see
222221
##### OPT_SORT_KEYS
223222

224223
Serialize `dict` keys in sorted order. The default is to serialize in an
225-
unspecified order.
224+
unspecified order. This is equivalent to `sort_keys=True` in the standard
225+
library.
226226

227227
This can be used to ensure the order is deterministic for hashing or tests.
228228
It has a substantial performance penalty and is not recommended in general.
@@ -630,8 +630,6 @@ format, containing floats and arrays, indented.
630630
| simplejson | 40.19 | 24.9 | 2.05 |
631631
| json | 41.5 | 24.1 | 2.12 |
632632

633-
634-
635633
If a row is blank, the library did not serialize and deserialize the fixture without
636634
modifying it, e.g., returning different values for floating point numbers.
637635

0 commit comments

Comments
 (0)