orjson


Nameorjson JSON
Version 3.10.1 PyPI version JSON
download
home_pagehttps://github.com/ijl/orjson
SummaryFast, correct Python JSON library supporting dataclasses, datetimes, and numpy
upload_time2024-04-15 22:09:22
maintainerNone
docs_urlNone
authorijl <ijl@mailbox.org>
requires_python>=3.8
licenseApache-2.0 OR MIT
keywords fast json dataclass dataclasses datetime rfc 8259 3339
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # orjson

orjson is a fast, correct JSON library for Python. It
[benchmarks](https://github.com/ijl/orjson#performance) as the fastest Python
library for JSON and is more correct than the standard json library or other
third-party libraries. It serializes
[dataclass](https://github.com/ijl/orjson#dataclass),
[datetime](https://github.com/ijl/orjson#datetime),
[numpy](https://github.com/ijl/orjson#numpy), and
[UUID](https://github.com/ijl/orjson#uuid) instances natively.

Its features and drawbacks compared to other Python JSON libraries:

* serializes `dataclass` instances 40-50x as fast as other libraries
* serializes `datetime`, `date`, and `time` instances to RFC 3339 format,
e.g., "1970-01-01T00:00:00+00:00"
* serializes `numpy.ndarray` instances 4-12x as fast with 0.3x the memory
usage of other libraries
* pretty prints 10x to 20x as fast as the standard library
* serializes to `bytes` rather than `str`, i.e., is not a drop-in replacement
* serializes `str` without escaping unicode to ASCII, e.g., "好" rather than
"\\\u597d"
* serializes `float` 10x as fast and deserializes twice as fast as other
libraries
* serializes subclasses of `str`, `int`, `list`, and `dict` natively,
requiring `default` to specify how to serialize others
* serializes arbitrary types using a `default` hook
* has strict UTF-8 conformance, more correct than the standard library
* has strict JSON conformance in not supporting Nan/Infinity/-Infinity
* has an option for strict JSON conformance on 53-bit integers with default
support for 64-bit
* does not provide `load()` or `dump()` functions for reading from/writing to
file-like objects

orjson supports CPython 3.8, 3.9, 3.10, 3.11, and 3.12. It distributes
amd64/x86_64, aarch64/armv8, arm7, POWER/ppc64le, and s390x wheels for Linux,
amd64 and aarch64 wheels for macOS, and amd64 and i686/x86 wheels for Windows.
orjson does not and will not support PyPy. orjson does not and will not
support PEP 554 subinterpreters. Releases follow semantic versioning and
serializing a new object type without an opt-in flag is considered a
breaking change.

orjson is licensed under both the Apache 2.0 and MIT licenses. The
repository and issue tracker is
[github.com/ijl/orjson](https://github.com/ijl/orjson), and patches may be
submitted there. There is a
[CHANGELOG](https://github.com/ijl/orjson/blob/master/CHANGELOG.md)
available in the repository.

1. [Usage](https://github.com/ijl/orjson#usage)
    1. [Install](https://github.com/ijl/orjson#install)
    2. [Quickstart](https://github.com/ijl/orjson#quickstart)
    3. [Migrating](https://github.com/ijl/orjson#migrating)
    4. [Serialize](https://github.com/ijl/orjson#serialize)
        1. [default](https://github.com/ijl/orjson#default)
        2. [option](https://github.com/ijl/orjson#option)
        3. [Fragment](https://github.com/ijl/orjson#fragment)
    5. [Deserialize](https://github.com/ijl/orjson#deserialize)
2. [Types](https://github.com/ijl/orjson#types)
    1. [dataclass](https://github.com/ijl/orjson#dataclass)
    2. [datetime](https://github.com/ijl/orjson#datetime)
    3. [enum](https://github.com/ijl/orjson#enum)
    4. [float](https://github.com/ijl/orjson#float)
    5. [int](https://github.com/ijl/orjson#int)
    6. [numpy](https://github.com/ijl/orjson#numpy)
    7. [str](https://github.com/ijl/orjson#str)
    8. [uuid](https://github.com/ijl/orjson#uuid)
3. [Testing](https://github.com/ijl/orjson#testing)
4. [Performance](https://github.com/ijl/orjson#performance)
    1. [Latency](https://github.com/ijl/orjson#latency)
    2. [Memory](https://github.com/ijl/orjson#memory)
    3. [Reproducing](https://github.com/ijl/orjson#reproducing)
5. [Questions](https://github.com/ijl/orjson#questions)
6. [Packaging](https://github.com/ijl/orjson#packaging)
7. [License](https://github.com/ijl/orjson#license)

## Usage

### Install

To install a wheel from PyPI:

```sh
pip install --upgrade "pip>=20.3" # manylinux_x_y, universal2 wheel support
pip install --upgrade orjson
```

To build a wheel, see [packaging](https://github.com/ijl/orjson#packaging).

### Quickstart

This is an example of serializing, with options specified, and deserializing:

```python
>>> import orjson, datetime, numpy
>>> data = {
    "type": "job",
    "created_at": datetime.datetime(1970, 1, 1),
    "status": "🆗",
    "payload": numpy.array([[1, 2], [3, 4]]),
}
>>> orjson.dumps(data, option=orjson.OPT_NAIVE_UTC | orjson.OPT_SERIALIZE_NUMPY)
b'{"type":"job","created_at":"1970-01-01T00:00:00+00:00","status":"\xf0\x9f\x86\x97","payload":[[1,2],[3,4]]}'
>>> orjson.loads(_)
{'type': 'job', 'created_at': '1970-01-01T00:00:00+00:00', 'status': '🆗', 'payload': [[1, 2], [3, 4]]}
```

### Migrating

orjson version 3 serializes more types than version 2. Subclasses of `str`,
`int`, `dict`, and `list` are now serialized. This is faster and more similar
to the standard library. It can be disabled with
`orjson.OPT_PASSTHROUGH_SUBCLASS`.`dataclasses.dataclass` instances
are now serialized by default and cannot be customized in a
`default` function unless `option=orjson.OPT_PASSTHROUGH_DATACLASS` is
specified. `uuid.UUID` instances are serialized by default.
For any type that is now serialized,
implementations in a `default` function and options enabling them can be
removed but do not need to be. There was no change in deserialization.

To migrate from the standard library, the largest difference is that
`orjson.dumps` returns `bytes` and `json.dumps` returns a `str`. Users with
`dict` objects using non-`str` keys should specify
`option=orjson.OPT_NON_STR_KEYS`. `sort_keys` is replaced by
`option=orjson.OPT_SORT_KEYS`. `indent` is replaced by
`option=orjson.OPT_INDENT_2` and other levels of indentation are not
supported.

### Serialize

```python
def dumps(
    __obj: Any,
    default: Optional[Callable[[Any], Any]] = ...,
    option: Optional[int] = ...,
) -> bytes: ...
```

`dumps()` serializes Python objects to JSON.

It natively serializes
`str`, `dict`, `list`, `tuple`, `int`, `float`, `bool`, `None`,
`dataclasses.dataclass`, `typing.TypedDict`, `datetime.datetime`,
`datetime.date`, `datetime.time`, `uuid.UUID`, `numpy.ndarray`, and
`orjson.Fragment` instances. It supports arbitrary types through `default`. It
serializes subclasses of `str`, `int`, `dict`, `list`,
`dataclasses.dataclass`, and `enum.Enum`. It does not serialize subclasses
of `tuple` to avoid serializing `namedtuple` objects as arrays. To avoid
serializing subclasses, specify the option `orjson.OPT_PASSTHROUGH_SUBCLASS`.

The output is a `bytes` object containing UTF-8.

The global interpreter lock (GIL) is held for the duration of the call.

It raises `JSONEncodeError` on an unsupported type. This exception message
describes the invalid object with the error message
`Type is not JSON serializable: ...`. To fix this, specify
[default](https://github.com/ijl/orjson#default).

It raises `JSONEncodeError` on a `str` that contains invalid UTF-8.

It raises `JSONEncodeError` on an integer that exceeds 64 bits by default or,
with `OPT_STRICT_INTEGER`, 53 bits.

It raises `JSONEncodeError` if a `dict` has a key of a type other than `str`,
unless `OPT_NON_STR_KEYS` is specified.

It raises `JSONEncodeError` if the output of `default` recurses to handling by
`default` more than 254 levels deep.

It raises `JSONEncodeError` on circular references.

It raises `JSONEncodeError`  if a `tzinfo` on a datetime object is
unsupported.

`JSONEncodeError` is a subclass of `TypeError`. This is for compatibility
with the standard library.

If the failure was caused by an exception in `default` then
`JSONEncodeError` chains the original exception as `__cause__`.

#### default

To serialize a subclass or arbitrary types, specify `default` as a
callable that returns a supported type. `default` may be a function,
lambda, or callable class instance. To specify that a type was not
handled by `default`, raise an exception such as `TypeError`.

```python
>>> import orjson, decimal
>>>
def default(obj):
    if isinstance(obj, decimal.Decimal):
        return str(obj)
    raise TypeError

>>> orjson.dumps(decimal.Decimal("0.0842389659712649442845"))
JSONEncodeError: Type is not JSON serializable: decimal.Decimal
>>> orjson.dumps(decimal.Decimal("0.0842389659712649442845"), default=default)
b'"0.0842389659712649442845"'
>>> orjson.dumps({1, 2}, default=default)
orjson.JSONEncodeError: Type is not JSON serializable: set
```

The `default` callable may return an object that itself
must be handled by `default` up to 254 times before an exception
is raised.

It is important that `default` raise an exception if a type cannot be handled.
Python otherwise implicitly returns `None`, which appears to the caller
like a legitimate value and is serialized:

```python
>>> import orjson, json, rapidjson
>>>
def default(obj):
    if isinstance(obj, decimal.Decimal):
        return str(obj)

>>> orjson.dumps({"set":{1, 2}}, default=default)
b'{"set":null}'
>>> json.dumps({"set":{1, 2}}, default=default)
'{"set":null}'
>>> rapidjson.dumps({"set":{1, 2}}, default=default)
'{"set":null}'
```

#### option

To modify how data is serialized, specify `option`. Each `option` is an integer
constant in `orjson`. To specify multiple options, mask them together, e.g.,
`option=orjson.OPT_STRICT_INTEGER | orjson.OPT_NAIVE_UTC`.

##### OPT_APPEND_NEWLINE

Append `\n` to the output. This is a convenience and optimization for the
pattern of `dumps(...) + "\n"`. `bytes` objects are immutable and this
pattern copies the original contents.

```python
>>> import orjson
>>> orjson.dumps([])
b"[]"
>>> orjson.dumps([], option=orjson.OPT_APPEND_NEWLINE)
b"[]\n"
```

##### OPT_INDENT_2

Pretty-print output with an indent of two spaces. This is equivalent to
`indent=2` in the standard library. Pretty printing is slower and the output
larger. orjson is the fastest compared library at pretty printing and has
much less of a slowdown to pretty print than the standard library does. This
option is compatible with all other options.

```python
>>> import orjson
>>> orjson.dumps({"a": "b", "c": {"d": True}, "e": [1, 2]})
b'{"a":"b","c":{"d":true},"e":[1,2]}'
>>> orjson.dumps(
    {"a": "b", "c": {"d": True}, "e": [1, 2]},
    option=orjson.OPT_INDENT_2
)
b'{\n  "a": "b",\n  "c": {\n    "d": true\n  },\n  "e": [\n    1,\n    2\n  ]\n}'
```

If displayed, the indentation and linebreaks appear like this:

```json
{
  "a": "b",
  "c": {
    "d": true
  },
  "e": [
    1,
    2
  ]
}
```

This measures serializing the github.json fixture as compact (52KiB) or
pretty (64KiB):

| Library    |   compact (ms) |   pretty (ms) |   vs. orjson |
|------------|----------------|---------------|--------------|
| orjson     |           0.03 |          0.04 |          1   |
| ujson      |           0.18 |          0.19 |          4.6 |
| rapidjson  |           0.1  |          0.12 |          2.9 |
| simplejson |           0.25 |          0.89 |         21.4 |
| json       |           0.18 |          0.71 |         17   |

This measures serializing the citm_catalog.json fixture, more of a worst
case due to the amount of nesting and newlines, as compact (489KiB) or
pretty (1.1MiB):

| Library    |   compact (ms) |   pretty (ms) |   vs. orjson |
|------------|----------------|---------------|--------------|
| orjson     |           0.59 |          0.71 |          1   |
| ujson      |           2.9  |          3.59 |          5   |
| rapidjson  |           1.81 |          2.8  |          3.9 |
| simplejson |          10.43 |         42.13 |         59.1 |
| json       |           4.16 |         33.42 |         46.9 |

This can be reproduced using the `pyindent` script.

##### OPT_NAIVE_UTC

Serialize `datetime.datetime` objects without a `tzinfo` as UTC. This
has no effect on `datetime.datetime` objects that have `tzinfo` set.

```python
>>> import orjson, datetime
>>> orjson.dumps(
        datetime.datetime(1970, 1, 1, 0, 0, 0),
    )
b'"1970-01-01T00:00:00"'
>>> orjson.dumps(
        datetime.datetime(1970, 1, 1, 0, 0, 0),
        option=orjson.OPT_NAIVE_UTC,
    )
b'"1970-01-01T00:00:00+00:00"'
```

##### OPT_NON_STR_KEYS

Serialize `dict` keys of type other than `str`. This allows `dict` keys
to be one of `str`, `int`, `float`, `bool`, `None`, `datetime.datetime`,
`datetime.date`, `datetime.time`, `enum.Enum`, and `uuid.UUID`. For comparison,
the standard library serializes `str`, `int`, `float`, `bool` or `None` by
default. orjson benchmarks as being faster at serializing non-`str` keys
than other libraries. This option is slower for `str` keys than the default.

```python
>>> import orjson, datetime, uuid
>>> orjson.dumps(
        {uuid.UUID("7202d115-7ff3-4c81-a7c1-2a1f067b1ece"): [1, 2, 3]},
        option=orjson.OPT_NON_STR_KEYS,
    )
b'{"7202d115-7ff3-4c81-a7c1-2a1f067b1ece":[1,2,3]}'
>>> orjson.dumps(
        {datetime.datetime(1970, 1, 1, 0, 0, 0): [1, 2, 3]},
        option=orjson.OPT_NON_STR_KEYS | orjson.OPT_NAIVE_UTC,
    )
b'{"1970-01-01T00:00:00+00:00":[1,2,3]}'
```

These types are generally serialized how they would be as
values, e.g., `datetime.datetime` is still an RFC 3339 string and respects
options affecting it. The exception is that `int` serialization does not
respect `OPT_STRICT_INTEGER`.

This option has the risk of creating duplicate keys. This is because non-`str`
objects may serialize to the same `str` as an existing key, e.g.,
`{"1": true, 1: false}`. The last key to be inserted to the `dict` will be
serialized last and a JSON deserializer will presumably take the last
occurrence of a key (in the above, `false`). The first value will be lost.

This option is compatible with `orjson.OPT_SORT_KEYS`. If sorting is used,
note the sort is unstable and will be unpredictable for duplicate keys.

```python
>>> import orjson, datetime
>>> orjson.dumps(
    {"other": 1, datetime.date(1970, 1, 5): 2, datetime.date(1970, 1, 3): 3},
    option=orjson.OPT_NON_STR_KEYS | orjson.OPT_SORT_KEYS
)
b'{"1970-01-03":3,"1970-01-05":2,"other":1}'
```

This measures serializing 589KiB of JSON comprising a `list` of 100 `dict`
in which each `dict` has both 365 randomly-sorted `int` keys representing epoch
timestamps as well as one `str` key and the value for each key is a
single integer. In "str keys", the keys were converted to `str` before
serialization, and orjson still specifes `option=orjson.OPT_NON_STR_KEYS`
(which is always somewhat slower).

| Library    |   str keys (ms) | int keys (ms)   | int keys sorted (ms)   |
|------------|-----------------|-----------------|------------------------|
| orjson     |            1.53 | 2.16            | 4.29                   |
| ujson      |            3.07 | 5.65            |                        |
| rapidjson  |            4.29 |                 |                        |
| simplejson |           11.24 | 14.50           | 21.86                  |
| json       |            7.17 | 8.49            |                        |

ujson is blank for sorting because it segfaults. json is blank because it
raises `TypeError` on attempting to sort before converting all keys to `str`.
rapidjson is blank because it does not support non-`str` keys. This can
be reproduced using the `pynonstr` script.

##### OPT_OMIT_MICROSECONDS

Do not serialize the `microsecond` field on `datetime.datetime` and
`datetime.time` instances.

```python
>>> import orjson, datetime
>>> orjson.dumps(
        datetime.datetime(1970, 1, 1, 0, 0, 0, 1),
    )
b'"1970-01-01T00:00:00.000001"'
>>> orjson.dumps(
        datetime.datetime(1970, 1, 1, 0, 0, 0, 1),
        option=orjson.OPT_OMIT_MICROSECONDS,
    )
b'"1970-01-01T00:00:00"'
```

##### OPT_PASSTHROUGH_DATACLASS

Passthrough `dataclasses.dataclass` instances to `default`. This allows
customizing their output but is much slower.


```python
>>> import orjson, dataclasses
>>>
@dataclasses.dataclass
class User:
    id: str
    name: str
    password: str

def default(obj):
    if isinstance(obj, User):
        return {"id": obj.id, "name": obj.name}
    raise TypeError

>>> orjson.dumps(User("3b1", "asd", "zxc"))
b'{"id":"3b1","name":"asd","password":"zxc"}'
>>> orjson.dumps(User("3b1", "asd", "zxc"), option=orjson.OPT_PASSTHROUGH_DATACLASS)
TypeError: Type is not JSON serializable: User
>>> orjson.dumps(
        User("3b1", "asd", "zxc"),
        option=orjson.OPT_PASSTHROUGH_DATACLASS,
        default=default,
    )
b'{"id":"3b1","name":"asd"}'
```

##### OPT_PASSTHROUGH_DATETIME

Passthrough `datetime.datetime`, `datetime.date`, and `datetime.time` instances
to `default`. This allows serializing datetimes to a custom format, e.g.,
HTTP dates:

```python
>>> import orjson, datetime
>>>
def default(obj):
    if isinstance(obj, datetime.datetime):
        return obj.strftime("%a, %d %b %Y %H:%M:%S GMT")
    raise TypeError

>>> orjson.dumps({"created_at": datetime.datetime(1970, 1, 1)})
b'{"created_at":"1970-01-01T00:00:00"}'
>>> orjson.dumps({"created_at": datetime.datetime(1970, 1, 1)}, option=orjson.OPT_PASSTHROUGH_DATETIME)
TypeError: Type is not JSON serializable: datetime.datetime
>>> orjson.dumps(
        {"created_at": datetime.datetime(1970, 1, 1)},
        option=orjson.OPT_PASSTHROUGH_DATETIME,
        default=default,
    )
b'{"created_at":"Thu, 01 Jan 1970 00:00:00 GMT"}'
```

This does not affect datetimes in `dict` keys if using OPT_NON_STR_KEYS.

##### OPT_PASSTHROUGH_SUBCLASS

Passthrough subclasses of builtin types to `default`.

```python
>>> import orjson
>>>
class Secret(str):
    pass

def default(obj):
    if isinstance(obj, Secret):
        return "******"
    raise TypeError

>>> orjson.dumps(Secret("zxc"))
b'"zxc"'
>>> orjson.dumps(Secret("zxc"), option=orjson.OPT_PASSTHROUGH_SUBCLASS)
TypeError: Type is not JSON serializable: Secret
>>> orjson.dumps(Secret("zxc"), option=orjson.OPT_PASSTHROUGH_SUBCLASS, default=default)
b'"******"'
```

This does not affect serializing subclasses as `dict` keys if using
OPT_NON_STR_KEYS.

##### OPT_SERIALIZE_DATACLASS

This is deprecated and has no effect in version 3. In version 2 this was
required to serialize  `dataclasses.dataclass` instances. For more, see
[dataclass](https://github.com/ijl/orjson#dataclass).

##### OPT_SERIALIZE_NUMPY

Serialize `numpy.ndarray` instances. For more, see
[numpy](https://github.com/ijl/orjson#numpy).

##### OPT_SERIALIZE_UUID

This is deprecated and has no effect in version 3. In version 2 this was
required to serialize `uuid.UUID` instances. For more, see
[UUID](https://github.com/ijl/orjson#UUID).

##### OPT_SORT_KEYS

Serialize `dict` keys in sorted order. The default is to serialize in an
unspecified order. This is equivalent to `sort_keys=True` in the standard
library.

This can be used to ensure the order is deterministic for hashing or tests.
It has a substantial performance penalty and is not recommended in general.

```python
>>> import orjson
>>> orjson.dumps({"b": 1, "c": 2, "a": 3})
b'{"b":1,"c":2,"a":3}'
>>> orjson.dumps({"b": 1, "c": 2, "a": 3}, option=orjson.OPT_SORT_KEYS)
b'{"a":3,"b":1,"c":2}'
```

This measures serializing the twitter.json fixture unsorted and sorted:

| Library    |   unsorted (ms) |   sorted (ms) |   vs. orjson |
|------------|-----------------|---------------|--------------|
| orjson     |            0.32 |          0.54 |          1   |
| ujson      |            1.6  |          2.07 |          3.8 |
| rapidjson  |            1.12 |          1.65 |          3.1 |
| simplejson |            2.25 |          3.13 |          5.8 |
| json       |            1.78 |          2.32 |          4.3 |

The benchmark can be reproduced using the `pysort` script.

The sorting is not collation/locale-aware:

```python
>>> import orjson
>>> orjson.dumps({"a": 1, "ä": 2, "A": 3}, option=orjson.OPT_SORT_KEYS)
b'{"A":3,"a":1,"\xc3\xa4":2}'
```

This is the same sorting behavior as the standard library, rapidjson,
simplejson, and ujson.

`dataclass` also serialize as maps but this has no effect on them.

##### OPT_STRICT_INTEGER

Enforce 53-bit limit on integers. The limit is otherwise 64 bits, the same as
the Python standard library. For more, see [int](https://github.com/ijl/orjson#int).

##### OPT_UTC_Z

Serialize a UTC timezone on `datetime.datetime` instances as `Z` instead
of `+00:00`.

```python
>>> import orjson, datetime, zoneinfo
>>> orjson.dumps(
        datetime.datetime(1970, 1, 1, 0, 0, 0, tzinfo=zoneinfo.ZoneInfo("UTC")),
    )
b'"1970-01-01T00:00:00+00:00"'
>>> orjson.dumps(
        datetime.datetime(1970, 1, 1, 0, 0, 0, tzinfo=zoneinfo.ZoneInfo("UTC")),
        option=orjson.OPT_UTC_Z
    )
b'"1970-01-01T00:00:00Z"'
```

#### Fragment

`orjson.Fragment` includes already-serialized JSON in a document. This is an
efficient way to include JSON blobs from a cache, JSONB field, or separately
serialized object without first deserializing to Python objects via `loads()`.

```python
>>> import orjson
>>> orjson.dumps({"key": "zxc", "data": orjson.Fragment(b'{"a": "b", "c": 1}')})
b'{"key":"zxc","data":{"a": "b", "c": 1}}'
```

It does no reformatting: `orjson.OPT_INDENT_2` will not affect a
compact blob nor will a pretty-printed JSON blob be rewritten as compact.

The input must be `bytes` or `str` and given as a positional argument.

This raises `orjson.JSONEncodeError` if a `str` is given and the input is
not valid UTF-8. It otherwise does no validation and it is possible to
write invalid JSON. This does not escape characters. The implementation is
tested to not crash if given invalid strings or invalid JSON.

This is similar to `RawJSON` in rapidjson.

### Deserialize

```python
def loads(__obj: Union[bytes, bytearray, memoryview, str]) -> Any: ...
```

`loads()` deserializes JSON to Python objects. It deserializes to `dict`,
`list`, `int`, `float`, `str`, `bool`, and `None` objects.

`bytes`, `bytearray`, `memoryview`, and `str` input are accepted. If the input
exists as a `memoryview`, `bytearray`, or `bytes` object, it is recommended to
pass these directly rather than creating an unnecessary `str` object. That is,
`orjson.loads(b"{}")` instead of `orjson.loads(b"{}".decode("utf-8"))`. This
has lower memory usage and lower latency.

The input must be valid UTF-8.

orjson maintains a cache of map keys for the duration of the process. This
causes a net reduction in memory usage by avoiding duplicate strings. The
keys must be at most 64 bytes to be cached and 1024 entries are stored.

The global interpreter lock (GIL) is held for the duration of the call.

It raises `JSONDecodeError` if given an invalid type or invalid
JSON. This includes if the input contains `NaN`, `Infinity`, or `-Infinity`,
which the standard library allows, but is not valid JSON.

It raises `JSONDecodeError` if a combination of array or object recurses
1024 levels deep.

`JSONDecodeError` is a subclass of `json.JSONDecodeError` and `ValueError`.
This is for compatibility with the standard library.

## Types

### dataclass

orjson serializes instances of `dataclasses.dataclass` natively. It serializes
instances 40-50x as fast as other libraries and avoids a severe slowdown seen
in other libraries compared to serializing `dict`.

It is supported to pass all variants of dataclasses, including dataclasses
using `__slots__`, frozen dataclasses, those with optional or default
attributes, and subclasses. There is a performance benefit to not
using `__slots__`.

| Library    | dict (ms)   | dataclass (ms)   | vs. orjson   |
|------------|-------------|------------------|--------------|
| orjson     | 1.40        | 1.60             | 1            |
| ujson      |             |                  |              |
| rapidjson  | 3.64        | 68.48            | 42           |
| simplejson | 14.21       | 92.18            | 57           |
| json       | 13.28       | 94.90            | 59           |

This measures serializing 555KiB of JSON, orjson natively and other libraries
using `default` to serialize the output of `dataclasses.asdict()`. This can be
reproduced using the `pydataclass` script.

Dataclasses are serialized as maps, with every attribute serialized and in
the order given on class definition:

```python
>>> import dataclasses, orjson, typing

@dataclasses.dataclass
class Member:
    id: int
    active: bool = dataclasses.field(default=False)

@dataclasses.dataclass
class Object:
    id: int
    name: str
    members: typing.List[Member]

>>> orjson.dumps(Object(1, "a", [Member(1, True), Member(2)]))
b'{"id":1,"name":"a","members":[{"id":1,"active":true},{"id":2,"active":false}]}'
```

### datetime

orjson serializes `datetime.datetime` objects to
[RFC 3339](https://tools.ietf.org/html/rfc3339) format,
e.g., "1970-01-01T00:00:00+00:00". This is a subset of ISO 8601 and is
compatible with `isoformat()` in the standard library.

```python
>>> import orjson, datetime, zoneinfo
>>> orjson.dumps(
    datetime.datetime(2018, 12, 1, 2, 3, 4, 9, tzinfo=zoneinfo.ZoneInfo("Australia/Adelaide"))
)
b'"2018-12-01T02:03:04.000009+10:30"'
>>> orjson.dumps(
    datetime.datetime(2100, 9, 1, 21, 55, 2).replace(tzinfo=zoneinfo.ZoneInfo("UTC"))
)
b'"2100-09-01T21:55:02+00:00"'
>>> orjson.dumps(
    datetime.datetime(2100, 9, 1, 21, 55, 2)
)
b'"2100-09-01T21:55:02"'
```

`datetime.datetime` supports instances with a `tzinfo` that is `None`,
`datetime.timezone.utc`, a timezone instance from the python3.9+ `zoneinfo`
module, or a timezone instance from the third-party `pendulum`, `pytz`, or
`dateutil`/`arrow` libraries.

It is fastest to use the standard library's `zoneinfo.ZoneInfo` for timezones.

`datetime.time` objects must not have a `tzinfo`.

```python
>>> import orjson, datetime
>>> orjson.dumps(datetime.time(12, 0, 15, 290))
b'"12:00:15.000290"'
```

`datetime.date` objects will always serialize.

```python
>>> import orjson, datetime
>>> orjson.dumps(datetime.date(1900, 1, 2))
b'"1900-01-02"'
```

Errors with `tzinfo` result in `JSONEncodeError` being raised.

To disable serialization of `datetime` objects specify the option
`orjson.OPT_PASSTHROUGH_DATETIME`.

To use "Z" suffix instead of "+00:00" to indicate UTC ("Zulu") time, use the option
`orjson.OPT_UTC_Z`.

To assume datetimes without timezone are UTC, use the option `orjson.OPT_NAIVE_UTC`.

### enum

orjson serializes enums natively. Options apply to their values.

```python
>>> import enum, datetime, orjson
>>>
class DatetimeEnum(enum.Enum):
    EPOCH = datetime.datetime(1970, 1, 1, 0, 0, 0)
>>> orjson.dumps(DatetimeEnum.EPOCH)
b'"1970-01-01T00:00:00"'
>>> orjson.dumps(DatetimeEnum.EPOCH, option=orjson.OPT_NAIVE_UTC)
b'"1970-01-01T00:00:00+00:00"'
```

Enums with members that are not supported types can be serialized using
`default`:

```python
>>> import enum, orjson
>>>
class Custom:
    def __init__(self, val):
        self.val = val

def default(obj):
    if isinstance(obj, Custom):
        return obj.val
    raise TypeError

class CustomEnum(enum.Enum):
    ONE = Custom(1)

>>> orjson.dumps(CustomEnum.ONE, default=default)
b'1'
```

### float

orjson serializes and deserializes double precision floats with no loss of
precision and consistent rounding.

`orjson.dumps()` serializes Nan, Infinity, and -Infinity, which are not
compliant JSON, as `null`:

```python
>>> import orjson, ujson, rapidjson, json
>>> orjson.dumps([float("NaN"), float("Infinity"), float("-Infinity")])
b'[null,null,null]'
>>> ujson.dumps([float("NaN"), float("Infinity"), float("-Infinity")])
OverflowError: Invalid Inf value when encoding double
>>> rapidjson.dumps([float("NaN"), float("Infinity"), float("-Infinity")])
'[NaN,Infinity,-Infinity]'
>>> json.dumps([float("NaN"), float("Infinity"), float("-Infinity")])
'[NaN, Infinity, -Infinity]'
```

### int

orjson serializes and deserializes 64-bit integers by default. The range
supported is a signed 64-bit integer's minimum (-9223372036854775807) to
an unsigned 64-bit integer's maximum (18446744073709551615). This
is widely compatible, but there are implementations
that only support 53-bits for integers, e.g.,
web browsers. For those implementations, `dumps()` can be configured to
raise a `JSONEncodeError` on values exceeding the 53-bit range.

```python
>>> import orjson
>>> orjson.dumps(9007199254740992)
b'9007199254740992'
>>> orjson.dumps(9007199254740992, option=orjson.OPT_STRICT_INTEGER)
JSONEncodeError: Integer exceeds 53-bit range
>>> orjson.dumps(-9007199254740992, option=orjson.OPT_STRICT_INTEGER)
JSONEncodeError: Integer exceeds 53-bit range
```

### numpy

orjson natively serializes `numpy.ndarray` and individual
`numpy.float64`, `numpy.float32`, `numpy.float16` (`numpy.half`),
`numpy.int64`, `numpy.int32`, `numpy.int16`, `numpy.int8`,
`numpy.uint64`, `numpy.uint32`, `numpy.uint16`, `numpy.uint8`,
`numpy.uintp`, `numpy.intp`, `numpy.datetime64`, and `numpy.bool`
instances.

orjson is faster than all compared libraries at serializing
numpy instances. Serializing numpy data requires specifying
`option=orjson.OPT_SERIALIZE_NUMPY`.

```python
>>> import orjson, numpy
>>> orjson.dumps(
        numpy.array([[1, 2, 3], [4, 5, 6]]),
        option=orjson.OPT_SERIALIZE_NUMPY,
)
b'[[1,2,3],[4,5,6]]'
```

The array must be a contiguous C array (`C_CONTIGUOUS`) and one of the
supported datatypes.

Note a difference between serializing `numpy.float32` using `ndarray.tolist()`
or `orjson.dumps(..., option=orjson.OPT_SERIALIZE_NUMPY)`: `tolist()` converts
to a `double` before serializing and orjson's native path does not. This
can result in different rounding.

`numpy.datetime64` instances are serialized as RFC 3339 strings and
datetime options affect them.

```python
>>> import orjson, numpy
>>> orjson.dumps(
        numpy.datetime64("2021-01-01T00:00:00.172"),
        option=orjson.OPT_SERIALIZE_NUMPY,
)
b'"2021-01-01T00:00:00.172000"'
>>> orjson.dumps(
        numpy.datetime64("2021-01-01T00:00:00.172"),
        option=(
            orjson.OPT_SERIALIZE_NUMPY |
            orjson.OPT_NAIVE_UTC |
            orjson.OPT_OMIT_MICROSECONDS
        ),
)
b'"2021-01-01T00:00:00+00:00"'
```

If an array is not a contiguous C array, contains an unsupported datatype,
or contains a `numpy.datetime64` using an unsupported representation
(e.g., picoseconds), orjson falls through to `default`. In `default`,
`obj.tolist()` can be specified.

If an array is not in the native endianness, e.g., an array of big-endian values
on a little-endian system, `orjson.JSONEncodeError`  is raised.

If an array is malformed, `orjson.JSONEncodeError` is raised.

This measures serializing 92MiB of JSON from an `numpy.ndarray` with
dimensions of `(50000, 100)` and `numpy.float64` values:

| Library    | Latency (ms)   | RSS diff (MiB)   | vs. orjson   |
|------------|----------------|------------------|--------------|
| orjson     | 194            | 99               | 1.0          |
| ujson      |                |                  |              |
| rapidjson  | 3,048          | 309              | 15.7         |
| simplejson | 3,023          | 297              | 15.6         |
| json       | 3,133          | 297              | 16.1         |

This measures serializing 100MiB of JSON from an `numpy.ndarray` with
dimensions of `(100000, 100)` and `numpy.int32` values:

| Library    | Latency (ms)   | RSS diff (MiB)   | vs. orjson   |
|------------|----------------|------------------|--------------|
| orjson     | 178            | 115              | 1.0          |
| ujson      |                |                  |              |
| rapidjson  | 1,512          | 551              | 8.5          |
| simplejson | 1,606          | 504              | 9.0          |
| json       | 1,506          | 503              | 8.4          |

This measures serializing 105MiB of JSON from an `numpy.ndarray` with
dimensions of `(100000, 200)` and `numpy.bool` values:

| Library    | Latency (ms)   | RSS diff (MiB)   | vs. orjson   |
|------------|----------------|------------------|--------------|
| orjson     | 157            | 120              | 1.0          |
| ujson      |                |                  |              |
| rapidjson  | 710            | 327              | 4.5          |
| simplejson | 931            | 398              | 5.9          |
| json       | 996            | 400              | 6.3          |

In these benchmarks, orjson serializes natively, ujson is blank because it
does not support a `default` parameter, and the other libraries serialize
`ndarray.tolist()` via `default`. The RSS column measures peak memory
usage during serialization. This can be reproduced using the `pynumpy` script.

orjson does not have an installation or compilation dependency on numpy. The
implementation is independent, reading `numpy.ndarray` using
`PyArrayInterface`.

### str

orjson is strict about UTF-8 conformance. This is stricter than the standard
library's json module, which will serialize and deserialize UTF-16 surrogates,
e.g., "\ud800", that are invalid UTF-8.

If `orjson.dumps()` is given a `str` that does not contain valid UTF-8,
`orjson.JSONEncodeError` is raised. If `loads()` receives invalid UTF-8,
`orjson.JSONDecodeError` is raised.

orjson and rapidjson are the only compared JSON libraries to consistently
error on bad input.

```python
>>> import orjson, ujson, rapidjson, json
>>> orjson.dumps('\ud800')
JSONEncodeError: str is not valid UTF-8: surrogates not allowed
>>> ujson.dumps('\ud800')
UnicodeEncodeError: 'utf-8' codec ...
>>> rapidjson.dumps('\ud800')
UnicodeEncodeError: 'utf-8' codec ...
>>> json.dumps('\ud800')
'"\\ud800"'
>>> orjson.loads('"\\ud800"')
JSONDecodeError: unexpected end of hex escape at line 1 column 8: line 1 column 1 (char 0)
>>> ujson.loads('"\\ud800"')
''
>>> rapidjson.loads('"\\ud800"')
ValueError: Parse error at offset 1: The surrogate pair in string is invalid.
>>> json.loads('"\\ud800"')
'\ud800'
```

To make a best effort at deserializing bad input, first decode `bytes` using
the `replace` or `lossy` argument for `errors`:

```python
>>> import orjson
>>> orjson.loads(b'"\xed\xa0\x80"')
JSONDecodeError: str is not valid UTF-8: surrogates not allowed
>>> orjson.loads(b'"\xed\xa0\x80"'.decode("utf-8", "replace"))
'���'
```

### uuid

orjson serializes `uuid.UUID` instances to
[RFC 4122](https://tools.ietf.org/html/rfc4122) format, e.g.,
"f81d4fae-7dec-11d0-a765-00a0c91e6bf6".

``` python
>>> import orjson, uuid
>>> orjson.dumps(uuid.UUID('f81d4fae-7dec-11d0-a765-00a0c91e6bf6'))
b'"f81d4fae-7dec-11d0-a765-00a0c91e6bf6"'
>>> orjson.dumps(uuid.uuid5(uuid.NAMESPACE_DNS, "python.org"))
b'"886313e1-3b8a-5372-9b90-0c9aee199e5d"'
```

## Testing

The library has comprehensive tests. There are tests against fixtures in the
[JSONTestSuite](https://github.com/nst/JSONTestSuite) and
[nativejson-benchmark](https://github.com/miloyip/nativejson-benchmark)
repositories. It is tested to not crash against the
[Big List of Naughty Strings](https://github.com/minimaxir/big-list-of-naughty-strings).
It is tested to not leak memory. It is tested to not crash
against and not accept invalid UTF-8. There are integration tests
exercising the library's use in web servers (gunicorn using multiprocess/forked
workers) and when
multithreaded. It also uses some tests from the ultrajson library.

orjson is the most correct of the compared libraries. This graph shows how each
library handles a combined 342 JSON fixtures from the
[JSONTestSuite](https://github.com/nst/JSONTestSuite) and
[nativejson-benchmark](https://github.com/miloyip/nativejson-benchmark) tests:

| Library    |   Invalid JSON documents not rejected |   Valid JSON documents not deserialized |
|------------|---------------------------------------|-----------------------------------------|
| orjson     |                                     0 |                                       0 |
| ujson      |                                    31 |                                       0 |
| rapidjson  |                                     6 |                                       0 |
| simplejson |                                    10 |                                       0 |
| json       |                                    17 |                                       0 |

This shows that all libraries deserialize valid JSON but only orjson
correctly rejects the given invalid JSON fixtures. Errors are largely due to
accepting invalid strings and numbers.

The graph above can be reproduced using the `pycorrectness` script.

## Performance

Serialization and deserialization performance of orjson is better than
ultrajson, rapidjson, simplejson, or json. The benchmarks are done on
fixtures of real data:

* twitter.json, 631.5KiB, results of a search on Twitter for "一", containing
CJK strings, dictionaries of strings and arrays of dictionaries, indented.

* github.json, 55.8KiB, a GitHub activity feed, containing dictionaries of
strings and arrays of dictionaries, not indented.

* citm_catalog.json, 1.7MiB, concert data, containing nested dictionaries of
strings and arrays of integers, indented.

* canada.json, 2.2MiB, coordinates of the Canadian border in GeoJSON
format, containing floats and arrays, indented.

### Latency

![Serialization](doc/serialization.png)

![Deserialization](doc/deserialization.png)

#### twitter.json serialization

| Library    |   Median latency (milliseconds) |   Operations per second |   Relative (latency) |
|------------|---------------------------------|-------------------------|----------------------|
| orjson     |                             0.3 |                    3085 |                  1   |
| ujson      |                             2.2 |                     454 |                  6.7 |
| rapidjson  |                             1.7 |                     605 |                  5.1 |
| simplejson |                             2.9 |                     350 |                  8.8 |
| json       |                             2.3 |                     439 |                  7   |

#### twitter.json deserialization

| Library    |   Median latency (milliseconds) |   Operations per second |   Relative (latency) |
|------------|---------------------------------|-------------------------|----------------------|
| orjson     |                             1.2 |                     839 |                  1   |
| ujson      |                             2.5 |                     396 |                  2.1 |
| rapidjson  |                             4.1 |                     243 |                  3.5 |
| simplejson |                             2.7 |                     367 |                  2.3 |
| json       |                             3.2 |                     310 |                  2.7 |

#### github.json serialization

| Library    |   Median latency (milliseconds) |   Operations per second |   Relative (latency) |
|------------|---------------------------------|-------------------------|----------------------|
| orjson     |                             0   |                   33474 |                  1   |
| ujson      |                             0.2 |                    5179 |                  6.5 |
| rapidjson  |                             0.2 |                    5910 |                  5.7 |
| simplejson |                             0.3 |                    3051 |                 11   |
| json       |                             0.2 |                    4222 |                  7.9 |

#### github.json deserialization

| Library    |   Median latency (milliseconds) |   Operations per second |   Relative (latency) |
|------------|---------------------------------|-------------------------|----------------------|
| orjson     |                             0.1 |                   10211 |                  1   |
| ujson      |                             0.2 |                    4222 |                  2.2 |
| rapidjson  |                             0.3 |                    3947 |                  2.6 |
| simplejson |                             0.2 |                    5437 |                  1.9 |
| json       |                             0.2 |                    5240 |                  1.9 |

#### citm_catalog.json serialization

| Library    |   Median latency (milliseconds) |   Operations per second |   Relative (latency) |
|------------|---------------------------------|-------------------------|----------------------|
| orjson     |                             0.6 |                    1549 |                  1   |
| ujson      |                             2.7 |                     366 |                  4.2 |
| rapidjson  |                             2.2 |                     446 |                  3.5 |
| simplejson |                            11.3 |                      88 |                 17.6 |
| json       |                             5.1 |                     195 |                  7.9 |

#### citm_catalog.json deserialization

| Library    |   Median latency (milliseconds) |   Operations per second |   Relative (latency) |
|------------|---------------------------------|-------------------------|----------------------|
| orjson     |                             2.7 |                     367 |                  1   |
| ujson      |                             4.7 |                     213 |                  1.7 |
| rapidjson  |                             7.2 |                     139 |                  2.6 |
| simplejson |                             6   |                     167 |                  2.2 |
| json       |                             6.3 |                     158 |                  2.3 |

#### canada.json serialization

| Library    |   Median latency (milliseconds) |   Operations per second |   Relative (latency) |
|------------|---------------------------------|-------------------------|----------------------|
| orjson     |                             4.8 |                     208 |                  1   |
| ujson      |                            15.6 |                      63 |                  3.3 |
| rapidjson  |                            42.4 |                      23 |                  8.9 |
| simplejson |                            72   |                      13 |                 15   |
| json       |                            46.2 |                      21 |                  9.6 |

#### canada.json deserialization

| Library    |   Median latency (milliseconds) |   Operations per second |   Relative (latency) |
|------------|---------------------------------|-------------------------|----------------------|
| orjson     |                             5.7 |                     176 |                  1   |
| ujson      |                            14   |                      71 |                  2.5 |
| rapidjson  |                            27.5 |                      36 |                  4.9 |
| simplejson |                            28.4 |                      35 |                  5   |
| json       |                            28.3 |                      35 |                  5   |

### Memory

orjson as of 3.7.0 has higher baseline memory usage than other libraries
due to a persistent buffer used for parsing. Incremental memory usage when
deserializing is similar to the standard library and other third-party
libraries.

This measures, in the first column, RSS after importing a library and reading
the fixture, and in the second column, increases in RSS after repeatedly
calling `loads()` on the fixture.

#### twitter.json

| Library    |   import, read() RSS (MiB) |   loads() increase in RSS (MiB) |
|------------|----------------------------|---------------------------------|
| orjson     |                       15.7 |                             3.4 |
| ujson      |                       16.4 |                             3.4 |
| rapidjson  |                       16.6 |                             4.4 |
| simplejson |                       14.5 |                             1.8 |
| json       |                       13.9 |                             1.8 |

#### github.json

| Library    |   import, read() RSS (MiB) |   loads() increase in RSS (MiB) |
|------------|----------------------------|---------------------------------|
| orjson     |                       15.2 |                             0.4 |
| ujson      |                       15.4 |                             0.4 |
| rapidjson  |                       15.7 |                             0.5 |
| simplejson |                       13.7 |                             0.2 |
| json       |                       13.3 |                             0.1 |

#### citm_catalog.json

| Library    |   import, read() RSS (MiB) |   loads() increase in RSS (MiB) |
|------------|----------------------------|---------------------------------|
| orjson     |                       16.8 |                            10.1 |
| ujson      |                       17.3 |                            10.2 |
| rapidjson  |                       17.6 |                            28.7 |
| simplejson |                       15.8 |                            30.1 |
| json       |                       14.8 |                            20.5 |

#### canada.json

| Library    |   import, read() RSS (MiB) |   loads() increase in RSS (MiB) |
|------------|----------------------------|---------------------------------|
| orjson     |                       17.2 |                            22.1 |
| ujson      |                       17.4 |                            18.3 |
| rapidjson  |                       18   |                            23.5 |
| simplejson |                       15.7 |                            21.4 |
| json       |                       15.4 |                            20.4 |

### Reproducing

The above was measured using Python 3.11.8 on Linux (amd64) with
orjson 3.10.0, ujson 5.9.0, python-rapidson 1.16, and simplejson 3.19.2.

The latency results can be reproduced using the `pybench` and `graph`
scripts. The memory results can be reproduced using the `pymem` script.

## Questions

### Why can't I install it from PyPI?

Probably `pip` needs to be upgraded to version 20.3 or later to support
the latest manylinux_x_y or universal2 wheel formats.

### "Cargo, the Rust package manager, is not installed or is not on PATH."

This happens when there are no binary wheels (like manylinux) for your
platform on PyPI. You can install [Rust](https://www.rust-lang.org/) through
`rustup` or a package manager and then it will compile.

### Will it deserialize to dataclasses, UUIDs, decimals, etc or support object_hook?

No. This requires a schema specifying what types are expected and how to
handle errors etc. This is addressed by data validation libraries a
level above this.

### Will it serialize to `str`?

No. `bytes` is the correct type for a serialized blob.

## Packaging

To package orjson requires at least [Rust](https://www.rust-lang.org/) 1.72
and the [maturin](https://github.com/PyO3/maturin) build tool. The recommended
build command is:

```sh
maturin build --release --strip
```

It benefits from also having a C build environment to compile a faster
deserialization backend. See this project's `manylinux_2_28` builds for an
example using clang and LTO.

The project's own CI tests against `nightly-2024-04-15` and stable 1.72. It
is prudent to pin the nightly version because that channel can introduce
breaking changes.

orjson is tested for amd64, aarch64, arm7, ppc64le, and s390x on Linux. It
is tested for either aarch64 or amd64 on macOS and cross-compiles for the other,
depending on version. For Windows it is tested on amd64 and i686.

There are no runtime dependencies other than libc.

The source distribution on PyPI contains all dependencies' source and can be
built without network access. The file can be downloaded from
`https://files.pythonhosted.org/packages/source/o/orjson/orjson-${version}.tar.gz`.

orjson's tests are included in the source distribution on PyPI. The
requirements to run the tests are specified in `test/requirements.txt`. The
tests should be run as part of the build. It can be run with
`pytest -q test`.

## License

orjson was written by ijl <<ijl@mailbox.org>>, copyright 2018 - 2024, available
to you under either the Apache 2 license or MIT license at your choice.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ijl/orjson",
    "name": "orjson",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "fast, json, dataclass, dataclasses, datetime, rfc, 8259, 3339",
    "author": "ijl <ijl@mailbox.org>",
    "author_email": "ijl <ijl@mailbox.org>",
    "download_url": "https://files.pythonhosted.org/packages/f5/af/0daa12a907215a5af6d97db8adf301ef14a1b1c651f7e176ee04e0998433/orjson-3.10.1.tar.gz",
    "platform": null,
    "description": "# orjson\r\n\r\norjson is a fast, correct JSON library for Python. It\r\n[benchmarks](https://github.com/ijl/orjson#performance) as the fastest Python\r\nlibrary for JSON and is more correct than the standard json library or other\r\nthird-party libraries. It serializes\r\n[dataclass](https://github.com/ijl/orjson#dataclass),\r\n[datetime](https://github.com/ijl/orjson#datetime),\r\n[numpy](https://github.com/ijl/orjson#numpy), and\r\n[UUID](https://github.com/ijl/orjson#uuid) instances natively.\r\n\r\nIts features and drawbacks compared to other Python JSON libraries:\r\n\r\n* serializes `dataclass` instances 40-50x as fast as other libraries\r\n* serializes `datetime`, `date`, and `time` instances to RFC 3339 format,\r\ne.g., \"1970-01-01T00:00:00+00:00\"\r\n* serializes `numpy.ndarray` instances 4-12x as fast with 0.3x the memory\r\nusage of other libraries\r\n* pretty prints 10x to 20x as fast as the standard library\r\n* serializes to `bytes` rather than `str`, i.e., is not a drop-in replacement\r\n* serializes `str` without escaping unicode to ASCII, e.g., \"\u597d\" rather than\r\n\"\\\\\\u597d\"\r\n* serializes `float` 10x as fast and deserializes twice as fast as other\r\nlibraries\r\n* serializes subclasses of `str`, `int`, `list`, and `dict` natively,\r\nrequiring `default` to specify how to serialize others\r\n* serializes arbitrary types using a `default` hook\r\n* has strict UTF-8 conformance, more correct than the standard library\r\n* has strict JSON conformance in not supporting Nan/Infinity/-Infinity\r\n* has an option for strict JSON conformance on 53-bit integers with default\r\nsupport for 64-bit\r\n* does not provide `load()` or `dump()` functions for reading from/writing to\r\nfile-like objects\r\n\r\norjson supports CPython 3.8, 3.9, 3.10, 3.11, and 3.12. It distributes\r\namd64/x86_64, aarch64/armv8, arm7, POWER/ppc64le, and s390x wheels for Linux,\r\namd64 and aarch64 wheels for macOS, and amd64 and i686/x86 wheels for Windows.\r\norjson does not and will not support PyPy. orjson does not and will not\r\nsupport PEP 554 subinterpreters. Releases follow semantic versioning and\r\nserializing a new object type without an opt-in flag is considered a\r\nbreaking change.\r\n\r\norjson is licensed under both the Apache 2.0 and MIT licenses. The\r\nrepository and issue tracker is\r\n[github.com/ijl/orjson](https://github.com/ijl/orjson), and patches may be\r\nsubmitted there. There is a\r\n[CHANGELOG](https://github.com/ijl/orjson/blob/master/CHANGELOG.md)\r\navailable in the repository.\r\n\r\n1. [Usage](https://github.com/ijl/orjson#usage)\r\n    1. [Install](https://github.com/ijl/orjson#install)\r\n    2. [Quickstart](https://github.com/ijl/orjson#quickstart)\r\n    3. [Migrating](https://github.com/ijl/orjson#migrating)\r\n    4. [Serialize](https://github.com/ijl/orjson#serialize)\r\n        1. [default](https://github.com/ijl/orjson#default)\r\n        2. [option](https://github.com/ijl/orjson#option)\r\n        3. [Fragment](https://github.com/ijl/orjson#fragment)\r\n    5. [Deserialize](https://github.com/ijl/orjson#deserialize)\r\n2. [Types](https://github.com/ijl/orjson#types)\r\n    1. [dataclass](https://github.com/ijl/orjson#dataclass)\r\n    2. [datetime](https://github.com/ijl/orjson#datetime)\r\n    3. [enum](https://github.com/ijl/orjson#enum)\r\n    4. [float](https://github.com/ijl/orjson#float)\r\n    5. [int](https://github.com/ijl/orjson#int)\r\n    6. [numpy](https://github.com/ijl/orjson#numpy)\r\n    7. [str](https://github.com/ijl/orjson#str)\r\n    8. [uuid](https://github.com/ijl/orjson#uuid)\r\n3. [Testing](https://github.com/ijl/orjson#testing)\r\n4. [Performance](https://github.com/ijl/orjson#performance)\r\n    1. [Latency](https://github.com/ijl/orjson#latency)\r\n    2. [Memory](https://github.com/ijl/orjson#memory)\r\n    3. [Reproducing](https://github.com/ijl/orjson#reproducing)\r\n5. [Questions](https://github.com/ijl/orjson#questions)\r\n6. [Packaging](https://github.com/ijl/orjson#packaging)\r\n7. [License](https://github.com/ijl/orjson#license)\r\n\r\n## Usage\r\n\r\n### Install\r\n\r\nTo install a wheel from PyPI:\r\n\r\n```sh\r\npip install --upgrade \"pip>=20.3\" # manylinux_x_y, universal2 wheel support\r\npip install --upgrade orjson\r\n```\r\n\r\nTo build a wheel, see [packaging](https://github.com/ijl/orjson#packaging).\r\n\r\n### Quickstart\r\n\r\nThis is an example of serializing, with options specified, and deserializing:\r\n\r\n```python\r\n>>> import orjson, datetime, numpy\r\n>>> data = {\r\n    \"type\": \"job\",\r\n    \"created_at\": datetime.datetime(1970, 1, 1),\r\n    \"status\": \"\ud83c\udd97\",\r\n    \"payload\": numpy.array([[1, 2], [3, 4]]),\r\n}\r\n>>> orjson.dumps(data, option=orjson.OPT_NAIVE_UTC | orjson.OPT_SERIALIZE_NUMPY)\r\nb'{\"type\":\"job\",\"created_at\":\"1970-01-01T00:00:00+00:00\",\"status\":\"\\xf0\\x9f\\x86\\x97\",\"payload\":[[1,2],[3,4]]}'\r\n>>> orjson.loads(_)\r\n{'type': 'job', 'created_at': '1970-01-01T00:00:00+00:00', 'status': '\ud83c\udd97', 'payload': [[1, 2], [3, 4]]}\r\n```\r\n\r\n### Migrating\r\n\r\norjson version 3 serializes more types than version 2. Subclasses of `str`,\r\n`int`, `dict`, and `list` are now serialized. This is faster and more similar\r\nto the standard library. It can be disabled with\r\n`orjson.OPT_PASSTHROUGH_SUBCLASS`.`dataclasses.dataclass` instances\r\nare now serialized by default and cannot be customized in a\r\n`default` function unless `option=orjson.OPT_PASSTHROUGH_DATACLASS` is\r\nspecified. `uuid.UUID` instances are serialized by default.\r\nFor any type that is now serialized,\r\nimplementations in a `default` function and options enabling them can be\r\nremoved but do not need to be. There was no change in deserialization.\r\n\r\nTo migrate from the standard library, the largest difference is that\r\n`orjson.dumps` returns `bytes` and `json.dumps` returns a `str`. Users with\r\n`dict` objects using non-`str` keys should specify\r\n`option=orjson.OPT_NON_STR_KEYS`. `sort_keys` is replaced by\r\n`option=orjson.OPT_SORT_KEYS`. `indent` is replaced by\r\n`option=orjson.OPT_INDENT_2` and other levels of indentation are not\r\nsupported.\r\n\r\n### Serialize\r\n\r\n```python\r\ndef dumps(\r\n    __obj: Any,\r\n    default: Optional[Callable[[Any], Any]] = ...,\r\n    option: Optional[int] = ...,\r\n) -> bytes: ...\r\n```\r\n\r\n`dumps()` serializes Python objects to JSON.\r\n\r\nIt natively serializes\r\n`str`, `dict`, `list`, `tuple`, `int`, `float`, `bool`, `None`,\r\n`dataclasses.dataclass`, `typing.TypedDict`, `datetime.datetime`,\r\n`datetime.date`, `datetime.time`, `uuid.UUID`, `numpy.ndarray`, and\r\n`orjson.Fragment` instances. It supports arbitrary types through `default`. It\r\nserializes subclasses of `str`, `int`, `dict`, `list`,\r\n`dataclasses.dataclass`, and `enum.Enum`. It does not serialize subclasses\r\nof `tuple` to avoid serializing `namedtuple` objects as arrays. To avoid\r\nserializing subclasses, specify the option `orjson.OPT_PASSTHROUGH_SUBCLASS`.\r\n\r\nThe output is a `bytes` object containing UTF-8.\r\n\r\nThe global interpreter lock (GIL) is held for the duration of the call.\r\n\r\nIt raises `JSONEncodeError` on an unsupported type. This exception message\r\ndescribes the invalid object with the error message\r\n`Type is not JSON serializable: ...`. To fix this, specify\r\n[default](https://github.com/ijl/orjson#default).\r\n\r\nIt raises `JSONEncodeError` on a `str` that contains invalid UTF-8.\r\n\r\nIt raises `JSONEncodeError` on an integer that exceeds 64 bits by default or,\r\nwith `OPT_STRICT_INTEGER`, 53 bits.\r\n\r\nIt raises `JSONEncodeError` if a `dict` has a key of a type other than `str`,\r\nunless `OPT_NON_STR_KEYS` is specified.\r\n\r\nIt raises `JSONEncodeError` if the output of `default` recurses to handling by\r\n`default` more than 254 levels deep.\r\n\r\nIt raises `JSONEncodeError` on circular references.\r\n\r\nIt raises `JSONEncodeError`  if a `tzinfo` on a datetime object is\r\nunsupported.\r\n\r\n`JSONEncodeError` is a subclass of `TypeError`. This is for compatibility\r\nwith the standard library.\r\n\r\nIf the failure was caused by an exception in `default` then\r\n`JSONEncodeError` chains the original exception as `__cause__`.\r\n\r\n#### default\r\n\r\nTo serialize a subclass or arbitrary types, specify `default` as a\r\ncallable that returns a supported type. `default` may be a function,\r\nlambda, or callable class instance. To specify that a type was not\r\nhandled by `default`, raise an exception such as `TypeError`.\r\n\r\n```python\r\n>>> import orjson, decimal\r\n>>>\r\ndef default(obj):\r\n    if isinstance(obj, decimal.Decimal):\r\n        return str(obj)\r\n    raise TypeError\r\n\r\n>>> orjson.dumps(decimal.Decimal(\"0.0842389659712649442845\"))\r\nJSONEncodeError: Type is not JSON serializable: decimal.Decimal\r\n>>> orjson.dumps(decimal.Decimal(\"0.0842389659712649442845\"), default=default)\r\nb'\"0.0842389659712649442845\"'\r\n>>> orjson.dumps({1, 2}, default=default)\r\norjson.JSONEncodeError: Type is not JSON serializable: set\r\n```\r\n\r\nThe `default` callable may return an object that itself\r\nmust be handled by `default` up to 254 times before an exception\r\nis raised.\r\n\r\nIt is important that `default` raise an exception if a type cannot be handled.\r\nPython otherwise implicitly returns `None`, which appears to the caller\r\nlike a legitimate value and is serialized:\r\n\r\n```python\r\n>>> import orjson, json, rapidjson\r\n>>>\r\ndef default(obj):\r\n    if isinstance(obj, decimal.Decimal):\r\n        return str(obj)\r\n\r\n>>> orjson.dumps({\"set\":{1, 2}}, default=default)\r\nb'{\"set\":null}'\r\n>>> json.dumps({\"set\":{1, 2}}, default=default)\r\n'{\"set\":null}'\r\n>>> rapidjson.dumps({\"set\":{1, 2}}, default=default)\r\n'{\"set\":null}'\r\n```\r\n\r\n#### option\r\n\r\nTo modify how data is serialized, specify `option`. Each `option` is an integer\r\nconstant in `orjson`. To specify multiple options, mask them together, e.g.,\r\n`option=orjson.OPT_STRICT_INTEGER | orjson.OPT_NAIVE_UTC`.\r\n\r\n##### OPT_APPEND_NEWLINE\r\n\r\nAppend `\\n` to the output. This is a convenience and optimization for the\r\npattern of `dumps(...) + \"\\n\"`. `bytes` objects are immutable and this\r\npattern copies the original contents.\r\n\r\n```python\r\n>>> import orjson\r\n>>> orjson.dumps([])\r\nb\"[]\"\r\n>>> orjson.dumps([], option=orjson.OPT_APPEND_NEWLINE)\r\nb\"[]\\n\"\r\n```\r\n\r\n##### OPT_INDENT_2\r\n\r\nPretty-print output with an indent of two spaces. This is equivalent to\r\n`indent=2` in the standard library. Pretty printing is slower and the output\r\nlarger. orjson is the fastest compared library at pretty printing and has\r\nmuch less of a slowdown to pretty print than the standard library does. This\r\noption is compatible with all other options.\r\n\r\n```python\r\n>>> import orjson\r\n>>> orjson.dumps({\"a\": \"b\", \"c\": {\"d\": True}, \"e\": [1, 2]})\r\nb'{\"a\":\"b\",\"c\":{\"d\":true},\"e\":[1,2]}'\r\n>>> orjson.dumps(\r\n    {\"a\": \"b\", \"c\": {\"d\": True}, \"e\": [1, 2]},\r\n    option=orjson.OPT_INDENT_2\r\n)\r\nb'{\\n  \"a\": \"b\",\\n  \"c\": {\\n    \"d\": true\\n  },\\n  \"e\": [\\n    1,\\n    2\\n  ]\\n}'\r\n```\r\n\r\nIf displayed, the indentation and linebreaks appear like this:\r\n\r\n```json\r\n{\r\n  \"a\": \"b\",\r\n  \"c\": {\r\n    \"d\": true\r\n  },\r\n  \"e\": [\r\n    1,\r\n    2\r\n  ]\r\n}\r\n```\r\n\r\nThis measures serializing the github.json fixture as compact (52KiB) or\r\npretty (64KiB):\r\n\r\n| Library    |   compact (ms) |   pretty (ms) |   vs. orjson |\r\n|------------|----------------|---------------|--------------|\r\n| orjson     |           0.03 |          0.04 |          1   |\r\n| ujson      |           0.18 |          0.19 |          4.6 |\r\n| rapidjson  |           0.1  |          0.12 |          2.9 |\r\n| simplejson |           0.25 |          0.89 |         21.4 |\r\n| json       |           0.18 |          0.71 |         17   |\r\n\r\nThis measures serializing the citm_catalog.json fixture, more of a worst\r\ncase due to the amount of nesting and newlines, as compact (489KiB) or\r\npretty (1.1MiB):\r\n\r\n| Library    |   compact (ms) |   pretty (ms) |   vs. orjson |\r\n|------------|----------------|---------------|--------------|\r\n| orjson     |           0.59 |          0.71 |          1   |\r\n| ujson      |           2.9  |          3.59 |          5   |\r\n| rapidjson  |           1.81 |          2.8  |          3.9 |\r\n| simplejson |          10.43 |         42.13 |         59.1 |\r\n| json       |           4.16 |         33.42 |         46.9 |\r\n\r\nThis can be reproduced using the `pyindent` script.\r\n\r\n##### OPT_NAIVE_UTC\r\n\r\nSerialize `datetime.datetime` objects without a `tzinfo` as UTC. This\r\nhas no effect on `datetime.datetime` objects that have `tzinfo` set.\r\n\r\n```python\r\n>>> import orjson, datetime\r\n>>> orjson.dumps(\r\n        datetime.datetime(1970, 1, 1, 0, 0, 0),\r\n    )\r\nb'\"1970-01-01T00:00:00\"'\r\n>>> orjson.dumps(\r\n        datetime.datetime(1970, 1, 1, 0, 0, 0),\r\n        option=orjson.OPT_NAIVE_UTC,\r\n    )\r\nb'\"1970-01-01T00:00:00+00:00\"'\r\n```\r\n\r\n##### OPT_NON_STR_KEYS\r\n\r\nSerialize `dict` keys of type other than `str`. This allows `dict` keys\r\nto be one of `str`, `int`, `float`, `bool`, `None`, `datetime.datetime`,\r\n`datetime.date`, `datetime.time`, `enum.Enum`, and `uuid.UUID`. For comparison,\r\nthe standard library serializes `str`, `int`, `float`, `bool` or `None` by\r\ndefault. orjson benchmarks as being faster at serializing non-`str` keys\r\nthan other libraries. This option is slower for `str` keys than the default.\r\n\r\n```python\r\n>>> import orjson, datetime, uuid\r\n>>> orjson.dumps(\r\n        {uuid.UUID(\"7202d115-7ff3-4c81-a7c1-2a1f067b1ece\"): [1, 2, 3]},\r\n        option=orjson.OPT_NON_STR_KEYS,\r\n    )\r\nb'{\"7202d115-7ff3-4c81-a7c1-2a1f067b1ece\":[1,2,3]}'\r\n>>> orjson.dumps(\r\n        {datetime.datetime(1970, 1, 1, 0, 0, 0): [1, 2, 3]},\r\n        option=orjson.OPT_NON_STR_KEYS | orjson.OPT_NAIVE_UTC,\r\n    )\r\nb'{\"1970-01-01T00:00:00+00:00\":[1,2,3]}'\r\n```\r\n\r\nThese types are generally serialized how they would be as\r\nvalues, e.g., `datetime.datetime` is still an RFC 3339 string and respects\r\noptions affecting it. The exception is that `int` serialization does not\r\nrespect `OPT_STRICT_INTEGER`.\r\n\r\nThis option has the risk of creating duplicate keys. This is because non-`str`\r\nobjects may serialize to the same `str` as an existing key, e.g.,\r\n`{\"1\": true, 1: false}`. The last key to be inserted to the `dict` will be\r\nserialized last and a JSON deserializer will presumably take the last\r\noccurrence of a key (in the above, `false`). The first value will be lost.\r\n\r\nThis option is compatible with `orjson.OPT_SORT_KEYS`. If sorting is used,\r\nnote the sort is unstable and will be unpredictable for duplicate keys.\r\n\r\n```python\r\n>>> import orjson, datetime\r\n>>> orjson.dumps(\r\n    {\"other\": 1, datetime.date(1970, 1, 5): 2, datetime.date(1970, 1, 3): 3},\r\n    option=orjson.OPT_NON_STR_KEYS | orjson.OPT_SORT_KEYS\r\n)\r\nb'{\"1970-01-03\":3,\"1970-01-05\":2,\"other\":1}'\r\n```\r\n\r\nThis measures serializing 589KiB of JSON comprising a `list` of 100 `dict`\r\nin which each `dict` has both 365 randomly-sorted `int` keys representing epoch\r\ntimestamps as well as one `str` key and the value for each key is a\r\nsingle integer. In \"str keys\", the keys were converted to `str` before\r\nserialization, and orjson still specifes `option=orjson.OPT_NON_STR_KEYS`\r\n(which is always somewhat slower).\r\n\r\n| Library    |   str keys (ms) | int keys (ms)   | int keys sorted (ms)   |\r\n|------------|-----------------|-----------------|------------------------|\r\n| orjson     |            1.53 | 2.16            | 4.29                   |\r\n| ujson      |            3.07 | 5.65            |                        |\r\n| rapidjson  |            4.29 |                 |                        |\r\n| simplejson |           11.24 | 14.50           | 21.86                  |\r\n| json       |            7.17 | 8.49            |                        |\r\n\r\nujson is blank for sorting because it segfaults. json is blank because it\r\nraises `TypeError` on attempting to sort before converting all keys to `str`.\r\nrapidjson is blank because it does not support non-`str` keys. This can\r\nbe reproduced using the `pynonstr` script.\r\n\r\n##### OPT_OMIT_MICROSECONDS\r\n\r\nDo not serialize the `microsecond` field on `datetime.datetime` and\r\n`datetime.time` instances.\r\n\r\n```python\r\n>>> import orjson, datetime\r\n>>> orjson.dumps(\r\n        datetime.datetime(1970, 1, 1, 0, 0, 0, 1),\r\n    )\r\nb'\"1970-01-01T00:00:00.000001\"'\r\n>>> orjson.dumps(\r\n        datetime.datetime(1970, 1, 1, 0, 0, 0, 1),\r\n        option=orjson.OPT_OMIT_MICROSECONDS,\r\n    )\r\nb'\"1970-01-01T00:00:00\"'\r\n```\r\n\r\n##### OPT_PASSTHROUGH_DATACLASS\r\n\r\nPassthrough `dataclasses.dataclass` instances to `default`. This allows\r\ncustomizing their output but is much slower.\r\n\r\n\r\n```python\r\n>>> import orjson, dataclasses\r\n>>>\r\n@dataclasses.dataclass\r\nclass User:\r\n    id: str\r\n    name: str\r\n    password: str\r\n\r\ndef default(obj):\r\n    if isinstance(obj, User):\r\n        return {\"id\": obj.id, \"name\": obj.name}\r\n    raise TypeError\r\n\r\n>>> orjson.dumps(User(\"3b1\", \"asd\", \"zxc\"))\r\nb'{\"id\":\"3b1\",\"name\":\"asd\",\"password\":\"zxc\"}'\r\n>>> orjson.dumps(User(\"3b1\", \"asd\", \"zxc\"), option=orjson.OPT_PASSTHROUGH_DATACLASS)\r\nTypeError: Type is not JSON serializable: User\r\n>>> orjson.dumps(\r\n        User(\"3b1\", \"asd\", \"zxc\"),\r\n        option=orjson.OPT_PASSTHROUGH_DATACLASS,\r\n        default=default,\r\n    )\r\nb'{\"id\":\"3b1\",\"name\":\"asd\"}'\r\n```\r\n\r\n##### OPT_PASSTHROUGH_DATETIME\r\n\r\nPassthrough `datetime.datetime`, `datetime.date`, and `datetime.time` instances\r\nto `default`. This allows serializing datetimes to a custom format, e.g.,\r\nHTTP dates:\r\n\r\n```python\r\n>>> import orjson, datetime\r\n>>>\r\ndef default(obj):\r\n    if isinstance(obj, datetime.datetime):\r\n        return obj.strftime(\"%a, %d %b %Y %H:%M:%S GMT\")\r\n    raise TypeError\r\n\r\n>>> orjson.dumps({\"created_at\": datetime.datetime(1970, 1, 1)})\r\nb'{\"created_at\":\"1970-01-01T00:00:00\"}'\r\n>>> orjson.dumps({\"created_at\": datetime.datetime(1970, 1, 1)}, option=orjson.OPT_PASSTHROUGH_DATETIME)\r\nTypeError: Type is not JSON serializable: datetime.datetime\r\n>>> orjson.dumps(\r\n        {\"created_at\": datetime.datetime(1970, 1, 1)},\r\n        option=orjson.OPT_PASSTHROUGH_DATETIME,\r\n        default=default,\r\n    )\r\nb'{\"created_at\":\"Thu, 01 Jan 1970 00:00:00 GMT\"}'\r\n```\r\n\r\nThis does not affect datetimes in `dict` keys if using OPT_NON_STR_KEYS.\r\n\r\n##### OPT_PASSTHROUGH_SUBCLASS\r\n\r\nPassthrough subclasses of builtin types to `default`.\r\n\r\n```python\r\n>>> import orjson\r\n>>>\r\nclass Secret(str):\r\n    pass\r\n\r\ndef default(obj):\r\n    if isinstance(obj, Secret):\r\n        return \"******\"\r\n    raise TypeError\r\n\r\n>>> orjson.dumps(Secret(\"zxc\"))\r\nb'\"zxc\"'\r\n>>> orjson.dumps(Secret(\"zxc\"), option=orjson.OPT_PASSTHROUGH_SUBCLASS)\r\nTypeError: Type is not JSON serializable: Secret\r\n>>> orjson.dumps(Secret(\"zxc\"), option=orjson.OPT_PASSTHROUGH_SUBCLASS, default=default)\r\nb'\"******\"'\r\n```\r\n\r\nThis does not affect serializing subclasses as `dict` keys if using\r\nOPT_NON_STR_KEYS.\r\n\r\n##### OPT_SERIALIZE_DATACLASS\r\n\r\nThis is deprecated and has no effect in version 3. In version 2 this was\r\nrequired to serialize  `dataclasses.dataclass` instances. For more, see\r\n[dataclass](https://github.com/ijl/orjson#dataclass).\r\n\r\n##### OPT_SERIALIZE_NUMPY\r\n\r\nSerialize `numpy.ndarray` instances. For more, see\r\n[numpy](https://github.com/ijl/orjson#numpy).\r\n\r\n##### OPT_SERIALIZE_UUID\r\n\r\nThis is deprecated and has no effect in version 3. In version 2 this was\r\nrequired to serialize `uuid.UUID` instances. For more, see\r\n[UUID](https://github.com/ijl/orjson#UUID).\r\n\r\n##### OPT_SORT_KEYS\r\n\r\nSerialize `dict` keys in sorted order. The default is to serialize in an\r\nunspecified order. This is equivalent to `sort_keys=True` in the standard\r\nlibrary.\r\n\r\nThis can be used to ensure the order is deterministic for hashing or tests.\r\nIt has a substantial performance penalty and is not recommended in general.\r\n\r\n```python\r\n>>> import orjson\r\n>>> orjson.dumps({\"b\": 1, \"c\": 2, \"a\": 3})\r\nb'{\"b\":1,\"c\":2,\"a\":3}'\r\n>>> orjson.dumps({\"b\": 1, \"c\": 2, \"a\": 3}, option=orjson.OPT_SORT_KEYS)\r\nb'{\"a\":3,\"b\":1,\"c\":2}'\r\n```\r\n\r\nThis measures serializing the twitter.json fixture unsorted and sorted:\r\n\r\n| Library    |   unsorted (ms) |   sorted (ms) |   vs. orjson |\r\n|------------|-----------------|---------------|--------------|\r\n| orjson     |            0.32 |          0.54 |          1   |\r\n| ujson      |            1.6  |          2.07 |          3.8 |\r\n| rapidjson  |            1.12 |          1.65 |          3.1 |\r\n| simplejson |            2.25 |          3.13 |          5.8 |\r\n| json       |            1.78 |          2.32 |          4.3 |\r\n\r\nThe benchmark can be reproduced using the `pysort` script.\r\n\r\nThe sorting is not collation/locale-aware:\r\n\r\n```python\r\n>>> import orjson\r\n>>> orjson.dumps({\"a\": 1, \"\u00e4\": 2, \"A\": 3}, option=orjson.OPT_SORT_KEYS)\r\nb'{\"A\":3,\"a\":1,\"\\xc3\\xa4\":2}'\r\n```\r\n\r\nThis is the same sorting behavior as the standard library, rapidjson,\r\nsimplejson, and ujson.\r\n\r\n`dataclass` also serialize as maps but this has no effect on them.\r\n\r\n##### OPT_STRICT_INTEGER\r\n\r\nEnforce 53-bit limit on integers. The limit is otherwise 64 bits, the same as\r\nthe Python standard library. For more, see [int](https://github.com/ijl/orjson#int).\r\n\r\n##### OPT_UTC_Z\r\n\r\nSerialize a UTC timezone on `datetime.datetime` instances as `Z` instead\r\nof `+00:00`.\r\n\r\n```python\r\n>>> import orjson, datetime, zoneinfo\r\n>>> orjson.dumps(\r\n        datetime.datetime(1970, 1, 1, 0, 0, 0, tzinfo=zoneinfo.ZoneInfo(\"UTC\")),\r\n    )\r\nb'\"1970-01-01T00:00:00+00:00\"'\r\n>>> orjson.dumps(\r\n        datetime.datetime(1970, 1, 1, 0, 0, 0, tzinfo=zoneinfo.ZoneInfo(\"UTC\")),\r\n        option=orjson.OPT_UTC_Z\r\n    )\r\nb'\"1970-01-01T00:00:00Z\"'\r\n```\r\n\r\n#### Fragment\r\n\r\n`orjson.Fragment` includes already-serialized JSON in a document. This is an\r\nefficient way to include JSON blobs from a cache, JSONB field, or separately\r\nserialized object without first deserializing to Python objects via `loads()`.\r\n\r\n```python\r\n>>> import orjson\r\n>>> orjson.dumps({\"key\": \"zxc\", \"data\": orjson.Fragment(b'{\"a\": \"b\", \"c\": 1}')})\r\nb'{\"key\":\"zxc\",\"data\":{\"a\": \"b\", \"c\": 1}}'\r\n```\r\n\r\nIt does no reformatting: `orjson.OPT_INDENT_2` will not affect a\r\ncompact blob nor will a pretty-printed JSON blob be rewritten as compact.\r\n\r\nThe input must be `bytes` or `str` and given as a positional argument.\r\n\r\nThis raises `orjson.JSONEncodeError` if a `str` is given and the input is\r\nnot valid UTF-8. It otherwise does no validation and it is possible to\r\nwrite invalid JSON. This does not escape characters. The implementation is\r\ntested to not crash if given invalid strings or invalid JSON.\r\n\r\nThis is similar to `RawJSON` in rapidjson.\r\n\r\n### Deserialize\r\n\r\n```python\r\ndef loads(__obj: Union[bytes, bytearray, memoryview, str]) -> Any: ...\r\n```\r\n\r\n`loads()` deserializes JSON to Python objects. It deserializes to `dict`,\r\n`list`, `int`, `float`, `str`, `bool`, and `None` objects.\r\n\r\n`bytes`, `bytearray`, `memoryview`, and `str` input are accepted. If the input\r\nexists as a `memoryview`, `bytearray`, or `bytes` object, it is recommended to\r\npass these directly rather than creating an unnecessary `str` object. That is,\r\n`orjson.loads(b\"{}\")` instead of `orjson.loads(b\"{}\".decode(\"utf-8\"))`. This\r\nhas lower memory usage and lower latency.\r\n\r\nThe input must be valid UTF-8.\r\n\r\norjson maintains a cache of map keys for the duration of the process. This\r\ncauses a net reduction in memory usage by avoiding duplicate strings. The\r\nkeys must be at most 64 bytes to be cached and 1024 entries are stored.\r\n\r\nThe global interpreter lock (GIL) is held for the duration of the call.\r\n\r\nIt raises `JSONDecodeError` if given an invalid type or invalid\r\nJSON. This includes if the input contains `NaN`, `Infinity`, or `-Infinity`,\r\nwhich the standard library allows, but is not valid JSON.\r\n\r\nIt raises `JSONDecodeError` if a combination of array or object recurses\r\n1024 levels deep.\r\n\r\n`JSONDecodeError` is a subclass of `json.JSONDecodeError` and `ValueError`.\r\nThis is for compatibility with the standard library.\r\n\r\n## Types\r\n\r\n### dataclass\r\n\r\norjson serializes instances of `dataclasses.dataclass` natively. It serializes\r\ninstances 40-50x as fast as other libraries and avoids a severe slowdown seen\r\nin other libraries compared to serializing `dict`.\r\n\r\nIt is supported to pass all variants of dataclasses, including dataclasses\r\nusing `__slots__`, frozen dataclasses, those with optional or default\r\nattributes, and subclasses. There is a performance benefit to not\r\nusing `__slots__`.\r\n\r\n| Library    | dict (ms)   | dataclass (ms)   | vs. orjson   |\r\n|------------|-------------|------------------|--------------|\r\n| orjson     | 1.40        | 1.60             | 1            |\r\n| ujson      |             |                  |              |\r\n| rapidjson  | 3.64        | 68.48            | 42           |\r\n| simplejson | 14.21       | 92.18            | 57           |\r\n| json       | 13.28       | 94.90            | 59           |\r\n\r\nThis measures serializing 555KiB of JSON, orjson natively and other libraries\r\nusing `default` to serialize the output of `dataclasses.asdict()`. This can be\r\nreproduced using the `pydataclass` script.\r\n\r\nDataclasses are serialized as maps, with every attribute serialized and in\r\nthe order given on class definition:\r\n\r\n```python\r\n>>> import dataclasses, orjson, typing\r\n\r\n@dataclasses.dataclass\r\nclass Member:\r\n    id: int\r\n    active: bool = dataclasses.field(default=False)\r\n\r\n@dataclasses.dataclass\r\nclass Object:\r\n    id: int\r\n    name: str\r\n    members: typing.List[Member]\r\n\r\n>>> orjson.dumps(Object(1, \"a\", [Member(1, True), Member(2)]))\r\nb'{\"id\":1,\"name\":\"a\",\"members\":[{\"id\":1,\"active\":true},{\"id\":2,\"active\":false}]}'\r\n```\r\n\r\n### datetime\r\n\r\norjson serializes `datetime.datetime` objects to\r\n[RFC 3339](https://tools.ietf.org/html/rfc3339) format,\r\ne.g., \"1970-01-01T00:00:00+00:00\". This is a subset of ISO 8601 and is\r\ncompatible with `isoformat()` in the standard library.\r\n\r\n```python\r\n>>> import orjson, datetime, zoneinfo\r\n>>> orjson.dumps(\r\n    datetime.datetime(2018, 12, 1, 2, 3, 4, 9, tzinfo=zoneinfo.ZoneInfo(\"Australia/Adelaide\"))\r\n)\r\nb'\"2018-12-01T02:03:04.000009+10:30\"'\r\n>>> orjson.dumps(\r\n    datetime.datetime(2100, 9, 1, 21, 55, 2).replace(tzinfo=zoneinfo.ZoneInfo(\"UTC\"))\r\n)\r\nb'\"2100-09-01T21:55:02+00:00\"'\r\n>>> orjson.dumps(\r\n    datetime.datetime(2100, 9, 1, 21, 55, 2)\r\n)\r\nb'\"2100-09-01T21:55:02\"'\r\n```\r\n\r\n`datetime.datetime` supports instances with a `tzinfo` that is `None`,\r\n`datetime.timezone.utc`, a timezone instance from the python3.9+ `zoneinfo`\r\nmodule, or a timezone instance from the third-party `pendulum`, `pytz`, or\r\n`dateutil`/`arrow` libraries.\r\n\r\nIt is fastest to use the standard library's `zoneinfo.ZoneInfo` for timezones.\r\n\r\n`datetime.time` objects must not have a `tzinfo`.\r\n\r\n```python\r\n>>> import orjson, datetime\r\n>>> orjson.dumps(datetime.time(12, 0, 15, 290))\r\nb'\"12:00:15.000290\"'\r\n```\r\n\r\n`datetime.date` objects will always serialize.\r\n\r\n```python\r\n>>> import orjson, datetime\r\n>>> orjson.dumps(datetime.date(1900, 1, 2))\r\nb'\"1900-01-02\"'\r\n```\r\n\r\nErrors with `tzinfo` result in `JSONEncodeError` being raised.\r\n\r\nTo disable serialization of `datetime` objects specify the option\r\n`orjson.OPT_PASSTHROUGH_DATETIME`.\r\n\r\nTo use \"Z\" suffix instead of \"+00:00\" to indicate UTC (\"Zulu\") time, use the option\r\n`orjson.OPT_UTC_Z`.\r\n\r\nTo assume datetimes without timezone are UTC, use the option `orjson.OPT_NAIVE_UTC`.\r\n\r\n### enum\r\n\r\norjson serializes enums natively. Options apply to their values.\r\n\r\n```python\r\n>>> import enum, datetime, orjson\r\n>>>\r\nclass DatetimeEnum(enum.Enum):\r\n    EPOCH = datetime.datetime(1970, 1, 1, 0, 0, 0)\r\n>>> orjson.dumps(DatetimeEnum.EPOCH)\r\nb'\"1970-01-01T00:00:00\"'\r\n>>> orjson.dumps(DatetimeEnum.EPOCH, option=orjson.OPT_NAIVE_UTC)\r\nb'\"1970-01-01T00:00:00+00:00\"'\r\n```\r\n\r\nEnums with members that are not supported types can be serialized using\r\n`default`:\r\n\r\n```python\r\n>>> import enum, orjson\r\n>>>\r\nclass Custom:\r\n    def __init__(self, val):\r\n        self.val = val\r\n\r\ndef default(obj):\r\n    if isinstance(obj, Custom):\r\n        return obj.val\r\n    raise TypeError\r\n\r\nclass CustomEnum(enum.Enum):\r\n    ONE = Custom(1)\r\n\r\n>>> orjson.dumps(CustomEnum.ONE, default=default)\r\nb'1'\r\n```\r\n\r\n### float\r\n\r\norjson serializes and deserializes double precision floats with no loss of\r\nprecision and consistent rounding.\r\n\r\n`orjson.dumps()` serializes Nan, Infinity, and -Infinity, which are not\r\ncompliant JSON, as `null`:\r\n\r\n```python\r\n>>> import orjson, ujson, rapidjson, json\r\n>>> orjson.dumps([float(\"NaN\"), float(\"Infinity\"), float(\"-Infinity\")])\r\nb'[null,null,null]'\r\n>>> ujson.dumps([float(\"NaN\"), float(\"Infinity\"), float(\"-Infinity\")])\r\nOverflowError: Invalid Inf value when encoding double\r\n>>> rapidjson.dumps([float(\"NaN\"), float(\"Infinity\"), float(\"-Infinity\")])\r\n'[NaN,Infinity,-Infinity]'\r\n>>> json.dumps([float(\"NaN\"), float(\"Infinity\"), float(\"-Infinity\")])\r\n'[NaN, Infinity, -Infinity]'\r\n```\r\n\r\n### int\r\n\r\norjson serializes and deserializes 64-bit integers by default. The range\r\nsupported is a signed 64-bit integer's minimum (-9223372036854775807) to\r\nan unsigned 64-bit integer's maximum (18446744073709551615). This\r\nis widely compatible, but there are implementations\r\nthat only support 53-bits for integers, e.g.,\r\nweb browsers. For those implementations, `dumps()` can be configured to\r\nraise a `JSONEncodeError` on values exceeding the 53-bit range.\r\n\r\n```python\r\n>>> import orjson\r\n>>> orjson.dumps(9007199254740992)\r\nb'9007199254740992'\r\n>>> orjson.dumps(9007199254740992, option=orjson.OPT_STRICT_INTEGER)\r\nJSONEncodeError: Integer exceeds 53-bit range\r\n>>> orjson.dumps(-9007199254740992, option=orjson.OPT_STRICT_INTEGER)\r\nJSONEncodeError: Integer exceeds 53-bit range\r\n```\r\n\r\n### numpy\r\n\r\norjson natively serializes `numpy.ndarray` and individual\r\n`numpy.float64`, `numpy.float32`, `numpy.float16` (`numpy.half`),\r\n`numpy.int64`, `numpy.int32`, `numpy.int16`, `numpy.int8`,\r\n`numpy.uint64`, `numpy.uint32`, `numpy.uint16`, `numpy.uint8`,\r\n`numpy.uintp`, `numpy.intp`, `numpy.datetime64`, and `numpy.bool`\r\ninstances.\r\n\r\norjson is faster than all compared libraries at serializing\r\nnumpy instances. Serializing numpy data requires specifying\r\n`option=orjson.OPT_SERIALIZE_NUMPY`.\r\n\r\n```python\r\n>>> import orjson, numpy\r\n>>> orjson.dumps(\r\n        numpy.array([[1, 2, 3], [4, 5, 6]]),\r\n        option=orjson.OPT_SERIALIZE_NUMPY,\r\n)\r\nb'[[1,2,3],[4,5,6]]'\r\n```\r\n\r\nThe array must be a contiguous C array (`C_CONTIGUOUS`) and one of the\r\nsupported datatypes.\r\n\r\nNote a difference between serializing `numpy.float32` using `ndarray.tolist()`\r\nor `orjson.dumps(..., option=orjson.OPT_SERIALIZE_NUMPY)`: `tolist()` converts\r\nto a `double` before serializing and orjson's native path does not. This\r\ncan result in different rounding.\r\n\r\n`numpy.datetime64` instances are serialized as RFC 3339 strings and\r\ndatetime options affect them.\r\n\r\n```python\r\n>>> import orjson, numpy\r\n>>> orjson.dumps(\r\n        numpy.datetime64(\"2021-01-01T00:00:00.172\"),\r\n        option=orjson.OPT_SERIALIZE_NUMPY,\r\n)\r\nb'\"2021-01-01T00:00:00.172000\"'\r\n>>> orjson.dumps(\r\n        numpy.datetime64(\"2021-01-01T00:00:00.172\"),\r\n        option=(\r\n            orjson.OPT_SERIALIZE_NUMPY |\r\n            orjson.OPT_NAIVE_UTC |\r\n            orjson.OPT_OMIT_MICROSECONDS\r\n        ),\r\n)\r\nb'\"2021-01-01T00:00:00+00:00\"'\r\n```\r\n\r\nIf an array is not a contiguous C array, contains an unsupported datatype,\r\nor contains a `numpy.datetime64` using an unsupported representation\r\n(e.g., picoseconds), orjson falls through to `default`. In `default`,\r\n`obj.tolist()` can be specified.\r\n\r\nIf an array is not in the native endianness, e.g., an array of big-endian values\r\non a little-endian system, `orjson.JSONEncodeError`  is raised.\r\n\r\nIf an array is malformed, `orjson.JSONEncodeError` is raised.\r\n\r\nThis measures serializing 92MiB of JSON from an `numpy.ndarray` with\r\ndimensions of `(50000, 100)` and `numpy.float64` values:\r\n\r\n| Library    | Latency (ms)   | RSS diff (MiB)   | vs. orjson   |\r\n|------------|----------------|------------------|--------------|\r\n| orjson     | 194            | 99               | 1.0          |\r\n| ujson      |                |                  |              |\r\n| rapidjson  | 3,048          | 309              | 15.7         |\r\n| simplejson | 3,023          | 297              | 15.6         |\r\n| json       | 3,133          | 297              | 16.1         |\r\n\r\nThis measures serializing 100MiB of JSON from an `numpy.ndarray` with\r\ndimensions of `(100000, 100)` and `numpy.int32` values:\r\n\r\n| Library    | Latency (ms)   | RSS diff (MiB)   | vs. orjson   |\r\n|------------|----------------|------------------|--------------|\r\n| orjson     | 178            | 115              | 1.0          |\r\n| ujson      |                |                  |              |\r\n| rapidjson  | 1,512          | 551              | 8.5          |\r\n| simplejson | 1,606          | 504              | 9.0          |\r\n| json       | 1,506          | 503              | 8.4          |\r\n\r\nThis measures serializing 105MiB of JSON from an `numpy.ndarray` with\r\ndimensions of `(100000, 200)` and `numpy.bool` values:\r\n\r\n| Library    | Latency (ms)   | RSS diff (MiB)   | vs. orjson   |\r\n|------------|----------------|------------------|--------------|\r\n| orjson     | 157            | 120              | 1.0          |\r\n| ujson      |                |                  |              |\r\n| rapidjson  | 710            | 327              | 4.5          |\r\n| simplejson | 931            | 398              | 5.9          |\r\n| json       | 996            | 400              | 6.3          |\r\n\r\nIn these benchmarks, orjson serializes natively, ujson is blank because it\r\ndoes not support a `default` parameter, and the other libraries serialize\r\n`ndarray.tolist()` via `default`. The RSS column measures peak memory\r\nusage during serialization. This can be reproduced using the `pynumpy` script.\r\n\r\norjson does not have an installation or compilation dependency on numpy. The\r\nimplementation is independent, reading `numpy.ndarray` using\r\n`PyArrayInterface`.\r\n\r\n### str\r\n\r\norjson is strict about UTF-8 conformance. This is stricter than the standard\r\nlibrary's json module, which will serialize and deserialize UTF-16 surrogates,\r\ne.g., \"\\ud800\", that are invalid UTF-8.\r\n\r\nIf `orjson.dumps()` is given a `str` that does not contain valid UTF-8,\r\n`orjson.JSONEncodeError` is raised. If `loads()` receives invalid UTF-8,\r\n`orjson.JSONDecodeError` is raised.\r\n\r\norjson and rapidjson are the only compared JSON libraries to consistently\r\nerror on bad input.\r\n\r\n```python\r\n>>> import orjson, ujson, rapidjson, json\r\n>>> orjson.dumps('\\ud800')\r\nJSONEncodeError: str is not valid UTF-8: surrogates not allowed\r\n>>> ujson.dumps('\\ud800')\r\nUnicodeEncodeError: 'utf-8' codec ...\r\n>>> rapidjson.dumps('\\ud800')\r\nUnicodeEncodeError: 'utf-8' codec ...\r\n>>> json.dumps('\\ud800')\r\n'\"\\\\ud800\"'\r\n>>> orjson.loads('\"\\\\ud800\"')\r\nJSONDecodeError: unexpected end of hex escape at line 1 column 8: line 1 column 1 (char 0)\r\n>>> ujson.loads('\"\\\\ud800\"')\r\n''\r\n>>> rapidjson.loads('\"\\\\ud800\"')\r\nValueError: Parse error at offset 1: The surrogate pair in string is invalid.\r\n>>> json.loads('\"\\\\ud800\"')\r\n'\\ud800'\r\n```\r\n\r\nTo make a best effort at deserializing bad input, first decode `bytes` using\r\nthe `replace` or `lossy` argument for `errors`:\r\n\r\n```python\r\n>>> import orjson\r\n>>> orjson.loads(b'\"\\xed\\xa0\\x80\"')\r\nJSONDecodeError: str is not valid UTF-8: surrogates not allowed\r\n>>> orjson.loads(b'\"\\xed\\xa0\\x80\"'.decode(\"utf-8\", \"replace\"))\r\n'\ufffd\ufffd\ufffd'\r\n```\r\n\r\n### uuid\r\n\r\norjson serializes `uuid.UUID` instances to\r\n[RFC 4122](https://tools.ietf.org/html/rfc4122) format, e.g.,\r\n\"f81d4fae-7dec-11d0-a765-00a0c91e6bf6\".\r\n\r\n``` python\r\n>>> import orjson, uuid\r\n>>> orjson.dumps(uuid.UUID('f81d4fae-7dec-11d0-a765-00a0c91e6bf6'))\r\nb'\"f81d4fae-7dec-11d0-a765-00a0c91e6bf6\"'\r\n>>> orjson.dumps(uuid.uuid5(uuid.NAMESPACE_DNS, \"python.org\"))\r\nb'\"886313e1-3b8a-5372-9b90-0c9aee199e5d\"'\r\n```\r\n\r\n## Testing\r\n\r\nThe library has comprehensive tests. There are tests against fixtures in the\r\n[JSONTestSuite](https://github.com/nst/JSONTestSuite) and\r\n[nativejson-benchmark](https://github.com/miloyip/nativejson-benchmark)\r\nrepositories. It is tested to not crash against the\r\n[Big List of Naughty Strings](https://github.com/minimaxir/big-list-of-naughty-strings).\r\nIt is tested to not leak memory. It is tested to not crash\r\nagainst and not accept invalid UTF-8. There are integration tests\r\nexercising the library's use in web servers (gunicorn using multiprocess/forked\r\nworkers) and when\r\nmultithreaded. It also uses some tests from the ultrajson library.\r\n\r\norjson is the most correct of the compared libraries. This graph shows how each\r\nlibrary handles a combined 342 JSON fixtures from the\r\n[JSONTestSuite](https://github.com/nst/JSONTestSuite) and\r\n[nativejson-benchmark](https://github.com/miloyip/nativejson-benchmark) tests:\r\n\r\n| Library    |   Invalid JSON documents not rejected |   Valid JSON documents not deserialized |\r\n|------------|---------------------------------------|-----------------------------------------|\r\n| orjson     |                                     0 |                                       0 |\r\n| ujson      |                                    31 |                                       0 |\r\n| rapidjson  |                                     6 |                                       0 |\r\n| simplejson |                                    10 |                                       0 |\r\n| json       |                                    17 |                                       0 |\r\n\r\nThis shows that all libraries deserialize valid JSON but only orjson\r\ncorrectly rejects the given invalid JSON fixtures. Errors are largely due to\r\naccepting invalid strings and numbers.\r\n\r\nThe graph above can be reproduced using the `pycorrectness` script.\r\n\r\n## Performance\r\n\r\nSerialization and deserialization performance of orjson is better than\r\nultrajson, rapidjson, simplejson, or json. The benchmarks are done on\r\nfixtures of real data:\r\n\r\n* twitter.json, 631.5KiB, results of a search on Twitter for \"\u4e00\", containing\r\nCJK strings, dictionaries of strings and arrays of dictionaries, indented.\r\n\r\n* github.json, 55.8KiB, a GitHub activity feed, containing dictionaries of\r\nstrings and arrays of dictionaries, not indented.\r\n\r\n* citm_catalog.json, 1.7MiB, concert data, containing nested dictionaries of\r\nstrings and arrays of integers, indented.\r\n\r\n* canada.json, 2.2MiB, coordinates of the Canadian border in GeoJSON\r\nformat, containing floats and arrays, indented.\r\n\r\n### Latency\r\n\r\n![Serialization](doc/serialization.png)\r\n\r\n![Deserialization](doc/deserialization.png)\r\n\r\n#### twitter.json serialization\r\n\r\n| Library    |   Median latency (milliseconds) |   Operations per second |   Relative (latency) |\r\n|------------|---------------------------------|-------------------------|----------------------|\r\n| orjson     |                             0.3 |                    3085 |                  1   |\r\n| ujson      |                             2.2 |                     454 |                  6.7 |\r\n| rapidjson  |                             1.7 |                     605 |                  5.1 |\r\n| simplejson |                             2.9 |                     350 |                  8.8 |\r\n| json       |                             2.3 |                     439 |                  7   |\r\n\r\n#### twitter.json deserialization\r\n\r\n| Library    |   Median latency (milliseconds) |   Operations per second |   Relative (latency) |\r\n|------------|---------------------------------|-------------------------|----------------------|\r\n| orjson     |                             1.2 |                     839 |                  1   |\r\n| ujson      |                             2.5 |                     396 |                  2.1 |\r\n| rapidjson  |                             4.1 |                     243 |                  3.5 |\r\n| simplejson |                             2.7 |                     367 |                  2.3 |\r\n| json       |                             3.2 |                     310 |                  2.7 |\r\n\r\n#### github.json serialization\r\n\r\n| Library    |   Median latency (milliseconds) |   Operations per second |   Relative (latency) |\r\n|------------|---------------------------------|-------------------------|----------------------|\r\n| orjson     |                             0   |                   33474 |                  1   |\r\n| ujson      |                             0.2 |                    5179 |                  6.5 |\r\n| rapidjson  |                             0.2 |                    5910 |                  5.7 |\r\n| simplejson |                             0.3 |                    3051 |                 11   |\r\n| json       |                             0.2 |                    4222 |                  7.9 |\r\n\r\n#### github.json deserialization\r\n\r\n| Library    |   Median latency (milliseconds) |   Operations per second |   Relative (latency) |\r\n|------------|---------------------------------|-------------------------|----------------------|\r\n| orjson     |                             0.1 |                   10211 |                  1   |\r\n| ujson      |                             0.2 |                    4222 |                  2.2 |\r\n| rapidjson  |                             0.3 |                    3947 |                  2.6 |\r\n| simplejson |                             0.2 |                    5437 |                  1.9 |\r\n| json       |                             0.2 |                    5240 |                  1.9 |\r\n\r\n#### citm_catalog.json serialization\r\n\r\n| Library    |   Median latency (milliseconds) |   Operations per second |   Relative (latency) |\r\n|------------|---------------------------------|-------------------------|----------------------|\r\n| orjson     |                             0.6 |                    1549 |                  1   |\r\n| ujson      |                             2.7 |                     366 |                  4.2 |\r\n| rapidjson  |                             2.2 |                     446 |                  3.5 |\r\n| simplejson |                            11.3 |                      88 |                 17.6 |\r\n| json       |                             5.1 |                     195 |                  7.9 |\r\n\r\n#### citm_catalog.json deserialization\r\n\r\n| Library    |   Median latency (milliseconds) |   Operations per second |   Relative (latency) |\r\n|------------|---------------------------------|-------------------------|----------------------|\r\n| orjson     |                             2.7 |                     367 |                  1   |\r\n| ujson      |                             4.7 |                     213 |                  1.7 |\r\n| rapidjson  |                             7.2 |                     139 |                  2.6 |\r\n| simplejson |                             6   |                     167 |                  2.2 |\r\n| json       |                             6.3 |                     158 |                  2.3 |\r\n\r\n#### canada.json serialization\r\n\r\n| Library    |   Median latency (milliseconds) |   Operations per second |   Relative (latency) |\r\n|------------|---------------------------------|-------------------------|----------------------|\r\n| orjson     |                             4.8 |                     208 |                  1   |\r\n| ujson      |                            15.6 |                      63 |                  3.3 |\r\n| rapidjson  |                            42.4 |                      23 |                  8.9 |\r\n| simplejson |                            72   |                      13 |                 15   |\r\n| json       |                            46.2 |                      21 |                  9.6 |\r\n\r\n#### canada.json deserialization\r\n\r\n| Library    |   Median latency (milliseconds) |   Operations per second |   Relative (latency) |\r\n|------------|---------------------------------|-------------------------|----------------------|\r\n| orjson     |                             5.7 |                     176 |                  1   |\r\n| ujson      |                            14   |                      71 |                  2.5 |\r\n| rapidjson  |                            27.5 |                      36 |                  4.9 |\r\n| simplejson |                            28.4 |                      35 |                  5   |\r\n| json       |                            28.3 |                      35 |                  5   |\r\n\r\n### Memory\r\n\r\norjson as of 3.7.0 has higher baseline memory usage than other libraries\r\ndue to a persistent buffer used for parsing. Incremental memory usage when\r\ndeserializing is similar to the standard library and other third-party\r\nlibraries.\r\n\r\nThis measures, in the first column, RSS after importing a library and reading\r\nthe fixture, and in the second column, increases in RSS after repeatedly\r\ncalling `loads()` on the fixture.\r\n\r\n#### twitter.json\r\n\r\n| Library    |   import, read() RSS (MiB) |   loads() increase in RSS (MiB) |\r\n|------------|----------------------------|---------------------------------|\r\n| orjson     |                       15.7 |                             3.4 |\r\n| ujson      |                       16.4 |                             3.4 |\r\n| rapidjson  |                       16.6 |                             4.4 |\r\n| simplejson |                       14.5 |                             1.8 |\r\n| json       |                       13.9 |                             1.8 |\r\n\r\n#### github.json\r\n\r\n| Library    |   import, read() RSS (MiB) |   loads() increase in RSS (MiB) |\r\n|------------|----------------------------|---------------------------------|\r\n| orjson     |                       15.2 |                             0.4 |\r\n| ujson      |                       15.4 |                             0.4 |\r\n| rapidjson  |                       15.7 |                             0.5 |\r\n| simplejson |                       13.7 |                             0.2 |\r\n| json       |                       13.3 |                             0.1 |\r\n\r\n#### citm_catalog.json\r\n\r\n| Library    |   import, read() RSS (MiB) |   loads() increase in RSS (MiB) |\r\n|------------|----------------------------|---------------------------------|\r\n| orjson     |                       16.8 |                            10.1 |\r\n| ujson      |                       17.3 |                            10.2 |\r\n| rapidjson  |                       17.6 |                            28.7 |\r\n| simplejson |                       15.8 |                            30.1 |\r\n| json       |                       14.8 |                            20.5 |\r\n\r\n#### canada.json\r\n\r\n| Library    |   import, read() RSS (MiB) |   loads() increase in RSS (MiB) |\r\n|------------|----------------------------|---------------------------------|\r\n| orjson     |                       17.2 |                            22.1 |\r\n| ujson      |                       17.4 |                            18.3 |\r\n| rapidjson  |                       18   |                            23.5 |\r\n| simplejson |                       15.7 |                            21.4 |\r\n| json       |                       15.4 |                            20.4 |\r\n\r\n### Reproducing\r\n\r\nThe above was measured using Python 3.11.8 on Linux (amd64) with\r\norjson 3.10.0, ujson 5.9.0, python-rapidson 1.16, and simplejson 3.19.2.\r\n\r\nThe latency results can be reproduced using the `pybench` and `graph`\r\nscripts. The memory results can be reproduced using the `pymem` script.\r\n\r\n## Questions\r\n\r\n### Why can't I install it from PyPI?\r\n\r\nProbably `pip` needs to be upgraded to version 20.3 or later to support\r\nthe latest manylinux_x_y or universal2 wheel formats.\r\n\r\n### \"Cargo, the Rust package manager, is not installed or is not on PATH.\"\r\n\r\nThis happens when there are no binary wheels (like manylinux) for your\r\nplatform on PyPI. You can install [Rust](https://www.rust-lang.org/) through\r\n`rustup` or a package manager and then it will compile.\r\n\r\n### Will it deserialize to dataclasses, UUIDs, decimals, etc or support object_hook?\r\n\r\nNo. This requires a schema specifying what types are expected and how to\r\nhandle errors etc. This is addressed by data validation libraries a\r\nlevel above this.\r\n\r\n### Will it serialize to `str`?\r\n\r\nNo. `bytes` is the correct type for a serialized blob.\r\n\r\n## Packaging\r\n\r\nTo package orjson requires at least [Rust](https://www.rust-lang.org/) 1.72\r\nand the [maturin](https://github.com/PyO3/maturin) build tool. The recommended\r\nbuild command is:\r\n\r\n```sh\r\nmaturin build --release --strip\r\n```\r\n\r\nIt benefits from also having a C build environment to compile a faster\r\ndeserialization backend. See this project's `manylinux_2_28` builds for an\r\nexample using clang and LTO.\r\n\r\nThe project's own CI tests against `nightly-2024-04-15` and stable 1.72. It\r\nis prudent to pin the nightly version because that channel can introduce\r\nbreaking changes.\r\n\r\norjson is tested for amd64, aarch64, arm7, ppc64le, and s390x on Linux. It\r\nis tested for either aarch64 or amd64 on macOS and cross-compiles for the other,\r\ndepending on version. For Windows it is tested on amd64 and i686.\r\n\r\nThere are no runtime dependencies other than libc.\r\n\r\nThe source distribution on PyPI contains all dependencies' source and can be\r\nbuilt without network access. The file can be downloaded from\r\n`https://files.pythonhosted.org/packages/source/o/orjson/orjson-${version}.tar.gz`.\r\n\r\norjson's tests are included in the source distribution on PyPI. The\r\nrequirements to run the tests are specified in `test/requirements.txt`. The\r\ntests should be run as part of the build. It can be run with\r\n`pytest -q test`.\r\n\r\n## License\r\n\r\norjson was written by ijl <<ijl@mailbox.org>>, copyright 2018 - 2024, available\r\nto you under either the Apache 2 license or MIT license at your choice.\r\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0 OR MIT",
    "summary": "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy",
    "version": "3.10.1",
    "project_urls": {
        "Changelog": "https://github.com/ijl/orjson/blob/master/CHANGELOG.md",
        "Homepage": "https://github.com/ijl/orjson"
    },
    "split_keywords": [
        "fast",
        " json",
        " dataclass",
        " dataclasses",
        " datetime",
        " rfc",
        " 8259",
        " 3339"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7383caaf26cd6e7c11c01de6d16494dd841cba9c41fb07540703a6e5d1b5f3a0",
                "md5": "533d78fe92c871758c492ed7f374b33a",
                "sha256": "8ec2fc456d53ea4a47768f622bb709be68acd455b0c6be57e91462259741c4f3"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl",
            "has_sig": false,
            "md5_digest": "533d78fe92c871758c492ed7f374b33a",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 250590,
            "upload_time": "2024-04-15T22:07:57",
            "upload_time_iso_8601": "2024-04-15T22:07:57.566140Z",
            "url": "https://files.pythonhosted.org/packages/73/83/caaf26cd6e7c11c01de6d16494dd841cba9c41fb07540703a6e5d1b5f3a0/orjson-3.10.1-cp310-cp310-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a7d474c2bb813e3b5c831e251e2c938d1c575459c68a4a24755256a1c7dd195b",
                "md5": "21ec37ba845f20bd77d06fcee0c8c51a",
                "sha256": "2e900863691d327758be14e2a491931605bd0aded3a21beb6ce133889830b659"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "21ec37ba845f20bd77d06fcee0c8c51a",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 147261,
            "upload_time": "2024-04-15T22:08:00",
            "upload_time_iso_8601": "2024-04-15T22:08:00.683476Z",
            "url": "https://files.pythonhosted.org/packages/a7/d4/74c2bb813e3b5c831e251e2c938d1c575459c68a4a24755256a1c7dd195b/orjson-3.10.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "804adb5f5ad7c043ff8d618e9c308ced327f171f909261670a43fb85d330b467",
                "md5": "e4d89acf152e7972184d19904097f10d",
                "sha256": "ab6ecbd6fe57785ebc86ee49e183f37d45f91b46fc601380c67c5c5e9c0014a2"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "has_sig": false,
            "md5_digest": "e4d89acf152e7972184d19904097f10d",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 148580,
            "upload_time": "2024-04-15T22:08:04",
            "upload_time_iso_8601": "2024-04-15T22:08:04.247491Z",
            "url": "https://files.pythonhosted.org/packages/80/4a/db5f5ad7c043ff8d618e9c308ced327f171f909261670a43fb85d330b467/orjson-3.10.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e27eebf0a05014b0a7e21d7082c1a12d9ddb38e8e57c87747143ff00984c8fca",
                "md5": "2890325d97f94ba4f2439e2870e64fe4",
                "sha256": "8af7c68b01b876335cccfb4eee0beef2b5b6eae1945d46a09a7c24c9faac7a77"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "has_sig": false,
            "md5_digest": "2890325d97f94ba4f2439e2870e64fe4",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 150118,
            "upload_time": "2024-04-15T22:08:06",
            "upload_time_iso_8601": "2024-04-15T22:08:06.468754Z",
            "url": "https://files.pythonhosted.org/packages/e2/7e/ebf0a05014b0a7e21d7082c1a12d9ddb38e8e57c87747143ff00984c8fca/orjson-3.10.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "68f5bf3e3b40586badb1c4c9f9dda245a9834e9ee3efe171728d30c0c727b164",
                "md5": "799510ab610a24af725d54761ddc84f7",
                "sha256": "915abfb2e528677b488a06eba173e9d7706a20fdfe9cdb15890b74ef9791b85e"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "has_sig": false,
            "md5_digest": "799510ab610a24af725d54761ddc84f7",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 160032,
            "upload_time": "2024-04-15T22:08:08",
            "upload_time_iso_8601": "2024-04-15T22:08:08.782898Z",
            "url": "https://files.pythonhosted.org/packages/68/f5/bf3e3b40586badb1c4c9f9dda245a9834e9ee3efe171728d30c0c727b164/orjson-3.10.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "70b18ccbaf6be91f0cb169c3062fcda4692ef4c8b02e338ed2520aeb108b2fd9",
                "md5": "c29ccc70f3ffb35ec9c51bba5c1d92c7",
                "sha256": "fe3fd4a36eff9c63d25503b439531d21828da9def0059c4f472e3845a081aa0b"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "c29ccc70f3ffb35ec9c51bba5c1d92c7",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 141072,
            "upload_time": "2024-04-15T22:08:10",
            "upload_time_iso_8601": "2024-04-15T22:08:10.443462Z",
            "url": "https://files.pythonhosted.org/packages/70/b1/8ccbaf6be91f0cb169c3062fcda4692ef4c8b02e338ed2520aeb108b2fd9/orjson-3.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8a8ac0f8de5f9cbaf911c3d5cb2bc0abae784456e886f962aa56164d105b81f1",
                "md5": "921678bbeba24268a692b4529317af50",
                "sha256": "d229564e72cfc062e6481a91977a5165c5a0fdce11ddc19ced8471847a67c517"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp310-cp310-musllinux_1_2_aarch64.whl",
            "has_sig": false,
            "md5_digest": "921678bbeba24268a692b4529317af50",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 329958,
            "upload_time": "2024-04-15T22:08:13",
            "upload_time_iso_8601": "2024-04-15T22:08:13.047708Z",
            "url": "https://files.pythonhosted.org/packages/8a/8a/c0f8de5f9cbaf911c3d5cb2bc0abae784456e886f962aa56164d105b81f1/orjson-3.10.1-cp310-cp310-musllinux_1_2_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "50ecdf73615ef98d0da112b6bd659cb0abb4663824b163f65612a5d0961ef5e0",
                "md5": "11306b90e79a7578f80cc1e5f9e71d7f",
                "sha256": "9e00495b18304173ac843b5c5fbea7b6f7968564d0d49bef06bfaeca4b656f4e"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp310-cp310-musllinux_1_2_x86_64.whl",
            "has_sig": false,
            "md5_digest": "11306b90e79a7578f80cc1e5f9e71d7f",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 311674,
            "upload_time": "2024-04-15T22:08:15",
            "upload_time_iso_8601": "2024-04-15T22:08:15.329236Z",
            "url": "https://files.pythonhosted.org/packages/50/ec/df73615ef98d0da112b6bd659cb0abb4663824b163f65612a5d0961ef5e0/orjson-3.10.1-cp310-cp310-musllinux_1_2_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fad83d5ee5da9bc27aee3a7e15649fde4c203da3549b3fa6905327c3aadcce69",
                "md5": "17133b40ae86a0e5141e6a22f23597ff",
                "sha256": "fd78ec55179545c108174ba19c1795ced548d6cac4d80d014163033c047ca4ea"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp310-none-win32.whl",
            "has_sig": false,
            "md5_digest": "17133b40ae86a0e5141e6a22f23597ff",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 139950,
            "upload_time": "2024-04-15T21:56:59",
            "upload_time_iso_8601": "2024-04-15T21:56:59.538241Z",
            "url": "https://files.pythonhosted.org/packages/fa/d8/3d5ee5da9bc27aee3a7e15649fde4c203da3549b3fa6905327c3aadcce69/orjson-3.10.1-cp310-none-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5b4042ee393448c5f77debc589b247f1400b51c5db95e906baa89d0fdd1ba0c2",
                "md5": "f092b69af0cdc9bb75d86a8700cfe36e",
                "sha256": "50ca42b40d5a442a9e22eece8cf42ba3d7cd4cd0f2f20184b4d7682894f05eec"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp310-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "f092b69af0cdc9bb75d86a8700cfe36e",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 139088,
            "upload_time": "2024-04-15T21:55:47",
            "upload_time_iso_8601": "2024-04-15T21:55:47.514715Z",
            "url": "https://files.pythonhosted.org/packages/5b/40/42ee393448c5f77debc589b247f1400b51c5db95e906baa89d0fdd1ba0c2/orjson-3.10.1-cp310-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5e056bff1dc3cf8823ae17f4c105e763680c15754d4c43d15073df825fbec6dc",
                "md5": "87486c998b33157d92df05903d79062d",
                "sha256": "b345a3d6953628df2f42502297f6c1e1b475cfbf6268013c94c5ac80e8abc04c"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl",
            "has_sig": false,
            "md5_digest": "87486c998b33157d92df05903d79062d",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 250594,
            "upload_time": "2024-04-15T22:08:17",
            "upload_time_iso_8601": "2024-04-15T22:08:17.543459Z",
            "url": "https://files.pythonhosted.org/packages/5e/05/6bff1dc3cf8823ae17f4c105e763680c15754d4c43d15073df825fbec6dc/orjson-3.10.1-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e5ed66651ca2cc3d0220b25cf70276b2e40c04e0122f084a5908dd952f94ec5d",
                "md5": "8e03aeec0ed9f122c995a0846a19b382",
                "sha256": "caa7395ef51af4190d2c70a364e2f42138e0e5fcb4bc08bc9b76997659b27dab"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "8e03aeec0ed9f122c995a0846a19b382",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 147263,
            "upload_time": "2024-04-15T22:08:20",
            "upload_time_iso_8601": "2024-04-15T22:08:20.151638Z",
            "url": "https://files.pythonhosted.org/packages/e5/ed/66651ca2cc3d0220b25cf70276b2e40c04e0122f084a5908dd952f94ec5d/orjson-3.10.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e5c0ebbe007b2c614f573f5488178ec02846252ed0a108ce796f44a5b95e18be",
                "md5": "cecef9bf8738844115e7bc68666195bc",
                "sha256": "b01d701decd75ae092e5f36f7b88a1e7a1d3bb7c9b9d7694de850fb155578d5a"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "has_sig": false,
            "md5_digest": "cecef9bf8738844115e7bc68666195bc",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 148601,
            "upload_time": "2024-04-15T22:08:21",
            "upload_time_iso_8601": "2024-04-15T22:08:21.886883Z",
            "url": "https://files.pythonhosted.org/packages/e5/c0/ebbe007b2c614f573f5488178ec02846252ed0a108ce796f44a5b95e18be/orjson-3.10.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6b3b4cbb304948d10104331c1e7a1257a5ac11a85bf1a90dfb9601f89166aa63",
                "md5": "8f1d463874b4fdc076a22ddbd54e0bd6",
                "sha256": "b5028981ba393f443d8fed9049211b979cadc9d0afecf162832f5a5b152c6297"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "has_sig": false,
            "md5_digest": "8f1d463874b4fdc076a22ddbd54e0bd6",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 150117,
            "upload_time": "2024-04-15T22:08:23",
            "upload_time_iso_8601": "2024-04-15T22:08:23.531637Z",
            "url": "https://files.pythonhosted.org/packages/6b/3b/4cbb304948d10104331c1e7a1257a5ac11a85bf1a90dfb9601f89166aa63/orjson-3.10.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f78f39d554aa829c637b5e0b6b81e3e7593e4f1b73cbf6d9b9bacb92e7513347",
                "md5": "6771c23b2be1bbc7f7258897587a29b3",
                "sha256": "31ff6a222ea362b87bf21ff619598a4dc1106aaafaea32b1c4876d692891ec27"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "has_sig": false,
            "md5_digest": "6771c23b2be1bbc7f7258897587a29b3",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 160032,
            "upload_time": "2024-04-15T22:08:25",
            "upload_time_iso_8601": "2024-04-15T22:08:25.967790Z",
            "url": "https://files.pythonhosted.org/packages/f7/8f/39d554aa829c637b5e0b6b81e3e7593e4f1b73cbf6d9b9bacb92e7513347/orjson-3.10.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "40c8bc8e7d389efcbb1e55cc7ddab05233ec66d4e764ada2dda19891cdb5b4de",
                "md5": "2a65e0fcb231080049411f3e973b9464",
                "sha256": "e852a83d7803d3406135fb7a57cf0c1e4a3e73bac80ec621bd32f01c653849c5"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "2a65e0fcb231080049411f3e973b9464",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 141074,
            "upload_time": "2024-04-15T22:08:28",
            "upload_time_iso_8601": "2024-04-15T22:08:28.455320Z",
            "url": "https://files.pythonhosted.org/packages/40/c8/bc8e7d389efcbb1e55cc7ddab05233ec66d4e764ada2dda19891cdb5b4de/orjson-3.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4e9763a984b63c2918bdc5d3288a252b5d379ac34e402e366dcc5732c5f73c3c",
                "md5": "70a42f339a6569b1734dacaff405076c",
                "sha256": "2567bc928ed3c3fcd90998009e8835de7c7dc59aabcf764b8374d36044864f3b"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp311-cp311-musllinux_1_2_aarch64.whl",
            "has_sig": false,
            "md5_digest": "70a42f339a6569b1734dacaff405076c",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 329963,
            "upload_time": "2024-04-15T22:08:30",
            "upload_time_iso_8601": "2024-04-15T22:08:30.170140Z",
            "url": "https://files.pythonhosted.org/packages/4e/97/63a984b63c2918bdc5d3288a252b5d379ac34e402e366dcc5732c5f73c3c/orjson-3.10.1-cp311-cp311-musllinux_1_2_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a8c536bf7abb5bf0f712c5552fa08e6f1b615d10d52ff123e2349e1b8cdc5437",
                "md5": "4dde60c8e9df64973ab1ed871d328583",
                "sha256": "4ce98cac60b7bb56457bdd2ed7f0d5d7f242d291fdc0ca566c83fa721b52e92d"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp311-cp311-musllinux_1_2_x86_64.whl",
            "has_sig": false,
            "md5_digest": "4dde60c8e9df64973ab1ed871d328583",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 311672,
            "upload_time": "2024-04-15T22:08:32",
            "upload_time_iso_8601": "2024-04-15T22:08:32.253150Z",
            "url": "https://files.pythonhosted.org/packages/a8/c5/36bf7abb5bf0f712c5552fa08e6f1b615d10d52ff123e2349e1b8cdc5437/orjson-3.10.1-cp311-cp311-musllinux_1_2_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "159eadc4f6924178a2123d5de93a8f7afbdf7dff18449ee3d1e6116cee65dfbb",
                "md5": "4574c55fba222a671e1a82218f5b47ac",
                "sha256": "813905e111318acb356bb8029014c77b4c647f8b03f314e7b475bd9ce6d1a8ce"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp311-none-win32.whl",
            "has_sig": false,
            "md5_digest": "4574c55fba222a671e1a82218f5b47ac",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 139952,
            "upload_time": "2024-04-15T21:57:25",
            "upload_time_iso_8601": "2024-04-15T21:57:25.343897Z",
            "url": "https://files.pythonhosted.org/packages/15/9e/adc4f6924178a2123d5de93a8f7afbdf7dff18449ee3d1e6116cee65dfbb/orjson-3.10.1-cp311-none-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "28f262bdd14f712fbc36afb3e3885abf88b6804324d8ad074f9431adb7d702ab",
                "md5": "223e9abad3453ef5914817062a7e9579",
                "sha256": "03a3ca0b3ed52bed1a869163a4284e8a7b0be6a0359d521e467cdef7e8e8a3ee"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp311-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "223e9abad3453ef5914817062a7e9579",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 139084,
            "upload_time": "2024-04-15T21:57:16",
            "upload_time_iso_8601": "2024-04-15T21:57:16.302539Z",
            "url": "https://files.pythonhosted.org/packages/28/f2/62bdd14f712fbc36afb3e3885abf88b6804324d8ad074f9431adb7d702ab/orjson-3.10.1-cp311-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "969693ee0a54cb8c91a3ae19ff74d5e9601a672854604cf3916f9b269df93bb5",
                "md5": "f3b77dacb43729ec33d2b175e4fb078c",
                "sha256": "f02c06cee680b1b3a8727ec26c36f4b3c0c9e2b26339d64471034d16f74f4ef5"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl",
            "has_sig": false,
            "md5_digest": "f3b77dacb43729ec33d2b175e4fb078c",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 250746,
            "upload_time": "2024-04-15T22:08:34",
            "upload_time_iso_8601": "2024-04-15T22:08:34.106794Z",
            "url": "https://files.pythonhosted.org/packages/96/96/93ee0a54cb8c91a3ae19ff74d5e9601a672854604cf3916f9b269df93bb5/orjson-3.10.1-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6dd6e2df31a1bd93e634555e509df8f327cef9d9a76c46eeec924dc441fa91bc",
                "md5": "0500e090dfb9cc2c8d8f6b15d0e1fcbe",
                "sha256": "b1aa2f127ac546e123283e437cc90b5ecce754a22306c7700b11035dad4ccf85"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "0500e090dfb9cc2c8d8f6b15d0e1fcbe",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 147235,
            "upload_time": "2024-04-15T22:08:36",
            "upload_time_iso_8601": "2024-04-15T22:08:36.051465Z",
            "url": "https://files.pythonhosted.org/packages/6d/d6/e2df31a1bd93e634555e509df8f327cef9d9a76c46eeec924dc441fa91bc/orjson-3.10.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "42c1e1175278edac933ea016d3b934871c8f20543e89f5b361c2b14dbf3e4310",
                "md5": "dc339f540804577defe5cdfad5d86dfc",
                "sha256": "2cf29b4b74f585225196944dffdebd549ad2af6da9e80db7115984103fb18a96"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "has_sig": false,
            "md5_digest": "dc339f540804577defe5cdfad5d86dfc",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 148698,
            "upload_time": "2024-04-15T22:08:37",
            "upload_time_iso_8601": "2024-04-15T22:08:37.795030Z",
            "url": "https://files.pythonhosted.org/packages/42/c1/e1175278edac933ea016d3b934871c8f20543e89f5b361c2b14dbf3e4310/orjson-3.10.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "da78c2b416a4462403884243d5f2b094405ff3696e45708e47bfd45080470810",
                "md5": "a3fb698e2edbcf0700dce8c765cc4692",
                "sha256": "a1b130c20b116f413caf6059c651ad32215c28500dce9cd029a334a2d84aa66f"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "has_sig": false,
            "md5_digest": "a3fb698e2edbcf0700dce8c765cc4692",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 150277,
            "upload_time": "2024-04-15T22:08:39",
            "upload_time_iso_8601": "2024-04-15T22:08:39.509477Z",
            "url": "https://files.pythonhosted.org/packages/da/78/c2b416a4462403884243d5f2b094405ff3696e45708e47bfd45080470810/orjson-3.10.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f1816c30d1189ebbfdaf53cd787c3deedafca38f3d1cc92db93a478565b1d292",
                "md5": "c3d41b4f215c705fd453e45c8074f128",
                "sha256": "d31f9a709e6114492136e87c7c6da5e21dfedebefa03af85f3ad72656c493ae9"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "has_sig": false,
            "md5_digest": "c3d41b4f215c705fd453e45c8074f128",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 160117,
            "upload_time": "2024-04-15T22:08:41",
            "upload_time_iso_8601": "2024-04-15T22:08:41.194979Z",
            "url": "https://files.pythonhosted.org/packages/f1/81/6c30d1189ebbfdaf53cd787c3deedafca38f3d1cc92db93a478565b1d292/orjson-3.10.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "87ab8be6626da8892ac71ac2e0b66ed38e8cf38e371d3921d92d8dd97f7de90a",
                "md5": "779f8b33cce6357ed8e7969b377cef9e",
                "sha256": "5d1d169461726f271ab31633cf0e7e7353417e16fb69256a4f8ecb3246a78d6e"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "779f8b33cce6357ed8e7969b377cef9e",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 141265,
            "upload_time": "2024-04-15T22:08:42",
            "upload_time_iso_8601": "2024-04-15T22:08:42.855696Z",
            "url": "https://files.pythonhosted.org/packages/87/ab/8be6626da8892ac71ac2e0b66ed38e8cf38e371d3921d92d8dd97f7de90a/orjson-3.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ba3993f629ed0fb4cc3d696f02620a963c157c31d50406ab61f1cc7330e06513",
                "md5": "50911b6d7dc3ca381e2d02373a442f15",
                "sha256": "57c294d73825c6b7f30d11c9e5900cfec9a814893af7f14efbe06b8d0f25fba9"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp312-cp312-musllinux_1_2_aarch64.whl",
            "has_sig": false,
            "md5_digest": "50911b6d7dc3ca381e2d02373a442f15",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 329937,
            "upload_time": "2024-04-15T22:08:45",
            "upload_time_iso_8601": "2024-04-15T22:08:45.034939Z",
            "url": "https://files.pythonhosted.org/packages/ba/39/93f629ed0fb4cc3d696f02620a963c157c31d50406ab61f1cc7330e06513/orjson-3.10.1-cp312-cp312-musllinux_1_2_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "888eac0960933ac58a1f8f4710fc13fd0b2d7b08d6cc6506f82b9bc55865b58a",
                "md5": "13f99d7cf3b607a013af2355bf9d3ebf",
                "sha256": "d7f11dbacfa9265ec76b4019efffabaabba7a7ebf14078f6b4df9b51c3c9a8ea"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp312-cp312-musllinux_1_2_x86_64.whl",
            "has_sig": false,
            "md5_digest": "13f99d7cf3b607a013af2355bf9d3ebf",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 311860,
            "upload_time": "2024-04-15T22:08:47",
            "upload_time_iso_8601": "2024-04-15T22:08:47.811560Z",
            "url": "https://files.pythonhosted.org/packages/88/8e/ac0960933ac58a1f8f4710fc13fd0b2d7b08d6cc6506f82b9bc55865b58a/orjson-3.10.1-cp312-cp312-musllinux_1_2_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d86f21f509065fe797eaddcda99212ed392c35d25d8dfe42247b5ed5a81d87ff",
                "md5": "0aff375981f9fdf978096a49dc3fb776",
                "sha256": "d89e5ed68593226c31c76ab4de3e0d35c760bfd3fbf0a74c4b2be1383a1bf123"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp312-none-win32.whl",
            "has_sig": false,
            "md5_digest": "0aff375981f9fdf978096a49dc3fb776",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 140095,
            "upload_time": "2024-04-15T21:56:37",
            "upload_time_iso_8601": "2024-04-15T21:56:37.603290Z",
            "url": "https://files.pythonhosted.org/packages/d8/6f/21f509065fe797eaddcda99212ed392c35d25d8dfe42247b5ed5a81d87ff/orjson-3.10.1-cp312-none-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2d5932131dc36b2d6f6de27572e6ca1ef18cc5aee08d29633aa9ba6cdb42438e",
                "md5": "9907187b05648e8550d8741c096bd95a",
                "sha256": "aa76c4fe147fd162107ce1692c39f7189180cfd3a27cfbc2ab5643422812da8e"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp312-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "9907187b05648e8550d8741c096bd95a",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 139195,
            "upload_time": "2024-04-15T21:54:28",
            "upload_time_iso_8601": "2024-04-15T21:54:28.982520Z",
            "url": "https://files.pythonhosted.org/packages/2d/59/32131dc36b2d6f6de27572e6ca1ef18cc5aee08d29633aa9ba6cdb42438e/orjson-3.10.1-cp312-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7c5554660562f8191def9d98935553c20f35f5d2e8f7ec431d1887a00b6dcf56",
                "md5": "37fa44cb943f7134cbef8e6793e54605",
                "sha256": "a2c6a85c92d0e494c1ae117befc93cf8e7bca2075f7fe52e32698da650b2c6d1"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl",
            "has_sig": false,
            "md5_digest": "37fa44cb943f7134cbef8e6793e54605",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 249966,
            "upload_time": "2024-04-15T22:08:49",
            "upload_time_iso_8601": "2024-04-15T22:08:49.675881Z",
            "url": "https://files.pythonhosted.org/packages/7c/55/54660562f8191def9d98935553c20f35f5d2e8f7ec431d1887a00b6dcf56/orjson-3.10.1-cp38-cp38-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c25ea4de7c063e74cd5f29091ff4e99c5a8823f82d6a15bbb5e0523ca4f519d7",
                "md5": "a98719d4369678ed36b3e9a7a559953b",
                "sha256": "9813f43da955197d36a7365eb99bed42b83680801729ab2487fef305b9ced866"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "a98719d4369678ed36b3e9a7a559953b",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 146877,
            "upload_time": "2024-04-15T22:08:51",
            "upload_time_iso_8601": "2024-04-15T22:08:51.710517Z",
            "url": "https://files.pythonhosted.org/packages/c2/5e/a4de7c063e74cd5f29091ff4e99c5a8823f82d6a15bbb5e0523ca4f519d7/orjson-3.10.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d8d144a15a0e0eb9954a1de0e243822aad0d0a16f2a1e9a61ca51dbc92830315",
                "md5": "cf1763c8322af806d90a6c9be5d1d17a",
                "sha256": "ec917b768e2b34b7084cb6c68941f6de5812cc26c6f1a9fecb728e36a3deb9e8"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "has_sig": false,
            "md5_digest": "cf1763c8322af806d90a6c9be5d1d17a",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 148192,
            "upload_time": "2024-04-15T22:08:53",
            "upload_time_iso_8601": "2024-04-15T22:08:53.984378Z",
            "url": "https://files.pythonhosted.org/packages/d8/d1/44a15a0e0eb9954a1de0e243822aad0d0a16f2a1e9a61ca51dbc92830315/orjson-3.10.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1375a06d2aa52a0aab2932ac71e4a509951b0698b4ca51f750ec641f0bb4c30a",
                "md5": "976838c820b28973e873936fb969e666",
                "sha256": "5252146b3172d75c8a6d27ebca59c9ee066ffc5a277050ccec24821e68742fdf"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "has_sig": false,
            "md5_digest": "976838c820b28973e873936fb969e666",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 149743,
            "upload_time": "2024-04-15T22:08:56",
            "upload_time_iso_8601": "2024-04-15T22:08:56.364822Z",
            "url": "https://files.pythonhosted.org/packages/13/75/a06d2aa52a0aab2932ac71e4a509951b0698b4ca51f750ec641f0bb4c30a/orjson-3.10.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d621bea62f2d47950324848393f2bc56b60865817f67739e93b7e62430fc9146",
                "md5": "4640c25243fad0c5b4885cfd9be3eed7",
                "sha256": "536429bb02791a199d976118b95014ad66f74c58b7644d21061c54ad284e00f4"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "has_sig": false,
            "md5_digest": "4640c25243fad0c5b4885cfd9be3eed7",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 159618,
            "upload_time": "2024-04-15T22:08:58",
            "upload_time_iso_8601": "2024-04-15T22:08:58.128665Z",
            "url": "https://files.pythonhosted.org/packages/d6/21/bea62f2d47950324848393f2bc56b60865817f67739e93b7e62430fc9146/orjson-3.10.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3ff754cb27fa43ef7940172b5d2a72cfaa14acdfaa8ec97d9fdda09fb6f5fb81",
                "md5": "c7e36045a9743c2f10ccfbd999ec798d",
                "sha256": "7dfed3c3e9b9199fb9c3355b9c7e4649b65f639e50ddf50efdf86b45c6de04b5"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "c7e36045a9743c2f10ccfbd999ec798d",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 140730,
            "upload_time": "2024-04-15T22:09:00",
            "upload_time_iso_8601": "2024-04-15T22:09:00.581229Z",
            "url": "https://files.pythonhosted.org/packages/3f/f7/54cb27fa43ef7940172b5d2a72cfaa14acdfaa8ec97d9fdda09fb6f5fb81/orjson-3.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6e3313899b1cc2c87a1a3c39b7945cf5b11669314f66b57b2046cd5fe3936a95",
                "md5": "b974ad6ad648aaa85e0bbdb17a7b5372",
                "sha256": "2b230ec35f188f003f5b543644ae486b2998f6afa74ee3a98fc8ed2e45960afc"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp38-cp38-musllinux_1_2_aarch64.whl",
            "has_sig": false,
            "md5_digest": "b974ad6ad648aaa85e0bbdb17a7b5372",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 329290,
            "upload_time": "2024-04-15T22:09:02",
            "upload_time_iso_8601": "2024-04-15T22:09:02.771963Z",
            "url": "https://files.pythonhosted.org/packages/6e/33/13899b1cc2c87a1a3c39b7945cf5b11669314f66b57b2046cd5fe3936a95/orjson-3.10.1-cp38-cp38-musllinux_1_2_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3f81c907281043ac1847adfe711de2a03f3aa466ecc5014d8a5b760281ef0198",
                "md5": "681674964c2f93f472529c530a76093a",
                "sha256": "01234249ba19c6ab1eb0b8be89f13ea21218b2d72d496ef085cfd37e1bae9dd8"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp38-cp38-musllinux_1_2_x86_64.whl",
            "has_sig": false,
            "md5_digest": "681674964c2f93f472529c530a76093a",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 311351,
            "upload_time": "2024-04-15T22:09:04",
            "upload_time_iso_8601": "2024-04-15T22:09:04.886961Z",
            "url": "https://files.pythonhosted.org/packages/3f/81/c907281043ac1847adfe711de2a03f3aa466ecc5014d8a5b760281ef0198/orjson-3.10.1-cp38-cp38-musllinux_1_2_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d14d08982fde5edcd40a5cceeee1cb9508107943b6f5813baf6105d9809b763f",
                "md5": "d0331b3f2776cfb519b1d4332f486dff",
                "sha256": "8a884fbf81a3cc22d264ba780920d4885442144e6acaa1411921260416ac9a54"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp38-none-win32.whl",
            "has_sig": false,
            "md5_digest": "d0331b3f2776cfb519b1d4332f486dff",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 139724,
            "upload_time": "2024-04-15T21:54:53",
            "upload_time_iso_8601": "2024-04-15T21:54:53.722519Z",
            "url": "https://files.pythonhosted.org/packages/d1/4d/08982fde5edcd40a5cceeee1cb9508107943b6f5813baf6105d9809b763f/orjson-3.10.1-cp38-none-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3a9d9434d53f81937e14b8c1e4bf12c03ee406ec0368d073eea391554b125ee4",
                "md5": "5129acb4abe7a9503277456423a73fb0",
                "sha256": "dab5f802d52b182163f307d2b1f727d30b1762e1923c64c9c56dd853f9671a49"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp38-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "5129acb4abe7a9503277456423a73fb0",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 138809,
            "upload_time": "2024-04-15T21:54:42",
            "upload_time_iso_8601": "2024-04-15T21:54:42.819509Z",
            "url": "https://files.pythonhosted.org/packages/3a/9d/9434d53f81937e14b8c1e4bf12c03ee406ec0368d073eea391554b125ee4/orjson-3.10.1-cp38-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b943bd83ff49df7c7d29012bf8af76c0d563e8848a3382a9413dfbedbefad132",
                "md5": "ff33839d97c04a021dd6c4169dbf1941",
                "sha256": "a51fd55d4486bc5293b7a400f9acd55a2dc3b5fc8420d5ffe9b1d6bb1a056a5e"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl",
            "has_sig": false,
            "md5_digest": "ff33839d97c04a021dd6c4169dbf1941",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 250161,
            "upload_time": "2024-04-15T22:09:06",
            "upload_time_iso_8601": "2024-04-15T22:09:06.688680Z",
            "url": "https://files.pythonhosted.org/packages/b9/43/bd83ff49df7c7d29012bf8af76c0d563e8848a3382a9413dfbedbefad132/orjson-3.10.1-cp39-cp39-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1cf9bea73fb2573537ab9c29e264f544bd6bd7765c8f2152f5c5c75722c531b9",
                "md5": "be1390dd48968f402446cddb679e0b79",
                "sha256": "53521542a6db1411b3bfa1b24ddce18605a3abdc95a28a67b33f9145f26aa8f2"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "be1390dd48968f402446cddb679e0b79",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 146983,
            "upload_time": "2024-04-15T22:09:08",
            "upload_time_iso_8601": "2024-04-15T22:09:08.405558Z",
            "url": "https://files.pythonhosted.org/packages/1c/f9/bea73fb2573537ab9c29e264f544bd6bd7765c8f2152f5c5c75722c531b9/orjson-3.10.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b09d5920c8e2d52708729f0f9a2b1877d5097f61a5957c039c1c446a49a3a5c0",
                "md5": "1a2acddaca5065c262eeaad747e08602",
                "sha256": "27d610df96ac18ace4931411d489637d20ab3b8f63562b0531bba16011998db0"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "has_sig": false,
            "md5_digest": "1a2acddaca5065c262eeaad747e08602",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 148274,
            "upload_time": "2024-04-15T22:09:10",
            "upload_time_iso_8601": "2024-04-15T22:09:10.343463Z",
            "url": "https://files.pythonhosted.org/packages/b0/9d/5920c8e2d52708729f0f9a2b1877d5097f61a5957c039c1c446a49a3a5c0/orjson-3.10.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7da4ff12594858f747b782ef0921eed97e578ec7abc9cd9ebb036543419c9ac8",
                "md5": "74ee74ef16508ec56d8ed384d0d7cb07",
                "sha256": "79244b1456e5846d44e9846534bd9e3206712936d026ea8e6a55a7374d2c0694"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "has_sig": false,
            "md5_digest": "74ee74ef16508ec56d8ed384d0d7cb07",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 149883,
            "upload_time": "2024-04-15T22:09:12",
            "upload_time_iso_8601": "2024-04-15T22:09:12.099089Z",
            "url": "https://files.pythonhosted.org/packages/7d/a4/ff12594858f747b782ef0921eed97e578ec7abc9cd9ebb036543419c9ac8/orjson-3.10.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c02f4ccf806acd32a6f9c68d5e1b797915e4b097f11f5cab62f16a4b5bbd2fa7",
                "md5": "2c66db7cecabf8722b8f317ddd9ccff4",
                "sha256": "d751efaa8a49ae15cbebdda747a62a9ae521126e396fda8143858419f3b03610"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "has_sig": false,
            "md5_digest": "2c66db7cecabf8722b8f317ddd9ccff4",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 159804,
            "upload_time": "2024-04-15T22:09:13",
            "upload_time_iso_8601": "2024-04-15T22:09:13.805952Z",
            "url": "https://files.pythonhosted.org/packages/c0/2f/4ccf806acd32a6f9c68d5e1b797915e4b097f11f5cab62f16a4b5bbd2fa7/orjson-3.10.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "586a676601cff14d5a8d8cbe7396927f743c5be53d0803f7c0693a9a59d9dcee",
                "md5": "d8fa2bf261154ee194bb056a9341b0b6",
                "sha256": "27ff69c620a4fff33267df70cfd21e0097c2a14216e72943bd5414943e376d77"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "d8fa2bf261154ee194bb056a9341b0b6",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 140870,
            "upload_time": "2024-04-15T22:09:16",
            "upload_time_iso_8601": "2024-04-15T22:09:16.060794Z",
            "url": "https://files.pythonhosted.org/packages/58/6a/676601cff14d5a8d8cbe7396927f743c5be53d0803f7c0693a9a59d9dcee/orjson-3.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "dccd007d07c9fa40c0a0883109ede751b9c2236a7b5bece18b42c387214c2d69",
                "md5": "6c1bf07c4af0e96a091eb898c3678caa",
                "sha256": "ebc58693464146506fde0c4eb1216ff6d4e40213e61f7d40e2f0dde9b2f21650"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp39-cp39-musllinux_1_2_aarch64.whl",
            "has_sig": false,
            "md5_digest": "6c1bf07c4af0e96a091eb898c3678caa",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 329390,
            "upload_time": "2024-04-15T22:09:18",
            "upload_time_iso_8601": "2024-04-15T22:09:18.172556Z",
            "url": "https://files.pythonhosted.org/packages/dc/cd/007d07c9fa40c0a0883109ede751b9c2236a7b5bece18b42c387214c2d69/orjson-3.10.1-cp39-cp39-musllinux_1_2_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0d93f5af5d0b5fcc7a1e1f11d5154e3593e845feaab1bac1a04cebd2c64eb02b",
                "md5": "a495fdceacc149d4201b7a407e6322f7",
                "sha256": "5be608c3972ed902e0143a5b8776d81ac1059436915d42defe5c6ae97b3137a4"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp39-cp39-musllinux_1_2_x86_64.whl",
            "has_sig": false,
            "md5_digest": "a495fdceacc149d4201b7a407e6322f7",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 311465,
            "upload_time": "2024-04-15T22:09:20",
            "upload_time_iso_8601": "2024-04-15T22:09:20.383468Z",
            "url": "https://files.pythonhosted.org/packages/0d/93/f5af5d0b5fcc7a1e1f11d5154e3593e845feaab1bac1a04cebd2c64eb02b/orjson-3.10.1-cp39-cp39-musllinux_1_2_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d7973eec9dea6425b96d0a1314d155973a11707d156b2c8879d02ab117845bd0",
                "md5": "d4121496016381fcb784f3a8c7b0e629",
                "sha256": "4ae10753e7511d359405aadcbf96556c86e9dbf3a948d26c2c9f9a150c52b091"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp39-none-win32.whl",
            "has_sig": false,
            "md5_digest": "d4121496016381fcb784f3a8c7b0e629",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 139815,
            "upload_time": "2024-04-15T21:54:53",
            "upload_time_iso_8601": "2024-04-15T21:54:53.465396Z",
            "url": "https://files.pythonhosted.org/packages/d7/97/3eec9dea6425b96d0a1314d155973a11707d156b2c8879d02ab117845bd0/orjson-3.10.1-cp39-none-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e374c99760f77f2c193d6386c5aca9d9f9b0df5ac2890c53a420de68bb0ccc5e",
                "md5": "933f98178d709de5d0fe6fc382945166",
                "sha256": "fb5bc4caa2c192077fdb02dce4e5ef8639e7f20bec4e3a834346693907362932"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1-cp39-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "933f98178d709de5d0fe6fc382945166",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 138930,
            "upload_time": "2024-04-15T21:54:57",
            "upload_time_iso_8601": "2024-04-15T21:54:57.366148Z",
            "url": "https://files.pythonhosted.org/packages/e3/74/c99760f77f2c193d6386c5aca9d9f9b0df5ac2890c53a420de68bb0ccc5e/orjson-3.10.1-cp39-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f5af0daa12a907215a5af6d97db8adf301ef14a1b1c651f7e176ee04e0998433",
                "md5": "ffc17df9e5acde5d14af9920404d7530",
                "sha256": "a883b28d73370df23ed995c466b4f6c708c1f7a9bdc400fe89165c96c7603204"
            },
            "downloads": -1,
            "filename": "orjson-3.10.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ffc17df9e5acde5d14af9920404d7530",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 4917664,
            "upload_time": "2024-04-15T22:09:22",
            "upload_time_iso_8601": "2024-04-15T22:09:22.461376Z",
            "url": "https://files.pythonhosted.org/packages/f5/af/0daa12a907215a5af6d97db8adf301ef14a1b1c651f7e176ee04e0998433/orjson-3.10.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-15 22:09:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ijl",
    "github_project": "orjson",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "orjson"
}
        
Elapsed time: 0.23986s