Skip to main content

Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy

Project description

orjson

orjson is a fast, correct JSON library for Python. It benchmarks as the fastest Python library for JSON and is more correct than the standard json library or other third-party libraries. It serializes dataclass, datetime, numpy, and 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.7, 3.8, 3.9, 3.10, and 3.11. It distributes x86_64/amd64, aarch64/armv8, and arm7 wheels for Linux, amd64 and aarch64 wheels for macOS, and amd64 wheels for Windows. orjson does not support PyPy. 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, and patches may be submitted there. There is a CHANGELOG available in the repository.

  1. Usage
    1. Install
    2. Quickstart
    3. Migrating
    4. Serialize
      1. default
      2. option
    5. Deserialize
  2. Types
    1. dataclass
    2. datetime
    3. enum
    4. float
    5. int
    6. numpy
    7. str
    8. uuid
  3. Testing
  4. Performance
    1. Latency
    2. Memory
    3. Reproducing
  5. Questions
  6. Packaging
  7. License

Usage

Install

To install a wheel from PyPI:

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

To build a wheel, see packaging.

Quickstart

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

>>> 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

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, dataclasses.dataclass, typing.TypedDict, datetime.datetime, datetime.date, datetime.time, uuid.UUID, numpy.ndarray, and None 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.

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.

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.

>>> 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:

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

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

>>> 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:

{
  "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.

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

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

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

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

>>> 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:

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

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

OPT_SERIALIZE_NUMPY

Serialize numpy.ndarray instances. For more, see 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.

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.

>>> 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:

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

OPT_UTC_Z

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

>>> 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"'

Deserialize

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. 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 512 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.

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:

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

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

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

datetime.date objects will always serialize.

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

Errors with tzinfo result in JSONEncodeError being raised.

It is faster to have orjson serialize datetime objects than to do so before calling dumps(). If using an unsupported type such as pendulum.datetime, use default.

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.

>>> 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:

>>> 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:

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

>>> 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.int64, numpy.int32, numpy.int8, numpy.uint64, numpy.uint32, numpy.uint8, numpy.uintp, or numpy.intp, and numpy.datetime64 instances.

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

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

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

>>> 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 supported 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 malformed, which is not expected, 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.

>>> 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:

>>> 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 format, e.g., "f81d4fae-7dec-11d0-a765-00a0c91e6bf6".

>>> 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 and nativejson-benchmark repositories. It is tested to not crash against the 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 and nativejson-benchmark tests:

Library Invalid JSON documents not rejected Valid JSON documents not deserialized
orjson 0 0
ujson 38 0
rapidjson 6 0
simplejson 13 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

twitter.json serialization

Library Median latency (milliseconds) Operations per second Relative (latency)
orjson 0.33 3069.4 1
ujson 1.68 592.8 5.15
rapidjson 1.12 891 3.45
simplejson 2.29 436.2 7.03
json 1.8 556.6 5.52

twitter.json deserialization

Library Median latency (milliseconds) Operations per second Relative (latency)
orjson 0.81 1237.6 1
ujson 1.87 533.9 2.32
rapidjson 2.97 335.8 3.67
simplejson 2.15 463.8 2.66
json 2.45 408.2 3.03

github.json serialization

Library Median latency (milliseconds) Operations per second Relative (latency)
orjson 0.03 28817.3 1
ujson 0.18 5478.2 5.26
rapidjson 0.1 9686.4 2.98
simplejson 0.26 3901.3 7.39
json 0.18 5437 5.27

github.json deserialization

Library Median latency (milliseconds) Operations per second Relative (latency)
orjson 0.07 15270 1
ujson 0.19 5374.8 2.84
rapidjson 0.17 5854.9 2.59
simplejson 0.15 6707.4 2.27
json 0.16 6397.3 2.39

citm_catalog.json serialization

Library Median latency (milliseconds) Operations per second Relative (latency)
orjson 0.58 1722.5 1
ujson 2.89 345.6 4.99
rapidjson 1.83 546.4 3.15
simplejson 10.39 95.9 17.89
json 3.93 254.6 6.77

citm_catalog.json deserialization

Library Median latency (milliseconds) Operations per second Relative (latency)
orjson 1.76 569.2 1
ujson 3.5 284.3 1.99
rapidjson 5.77 173.2 3.28
simplejson 5.13 194.7 2.92
json 4.99 200.5 2.84

canada.json serialization

Library Median latency (milliseconds) Operations per second Relative (latency)
orjson 3.62 276.3 1
ujson 14.16 70.6 3.91
rapidjson 33.64 29.7 9.29
simplejson 57.46 17.4 15.88
json 35.7 28 9.86

canada.json deserialization

Library Median latency (milliseconds) Operations per second Relative (latency)
orjson 3.89 256.6 1
ujson 8.73 114.3 2.24
rapidjson 23.33 42.8 5.99
simplejson 23.99 41.7 6.16
json 21.1 47.4 5.42

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 21.8 2.8
ujson 14.3 4.8
rapidjson 14.9 4.6
simplejson 13.4 2.4
json 13.1 2.3

github.json

Library import, read() RSS (MiB) loads() increase in RSS (MiB)
orjson 21.2 0.5
ujson 13.6 0.6
rapidjson 14.1 0.5
simplejson 12.5 0.3
json 12.4 0.3

citm_catalog.json

Library import, read() RSS (MiB) loads() increase in RSS (MiB)
orjson 23 10.6
ujson 15.2 11.2
rapidjson 15.8 29.7
simplejson 14.4 24.7
json 13.9 24.7

canada.json

Library import, read() RSS (MiB) loads() increase in RSS (MiB)
orjson 23.2 21.3
ujson 15.6 19.2
rapidjson 16.3 23.4
simplejson 15 21.1
json 14.3 20.9

Reproducing

The above was measured using Python 3.10.5 on Linux (amd64) with orjson 3.7.9, ujson 5.4.0, python-rapidson 1.8, and simplejson 3.17.6.

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

Will it support PyPy?

Probably not.

Packaging

To package orjson requires at least Rust 1.57 and the maturin build tool. The recommended build command is:

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-2022-07-26 and stable 1.54. It is prudent to pin the nightly version because that channel can introduce breaking changes.

orjson is tested for amd64, aarch64, and arm7 on Linux. It is tested for amd64 on macOS and cross-compiles for aarch64. For Windows it is tested on amd64.

There are no runtime dependencies other than libc.

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 - 2022, licensed under both the Apache 2 and MIT licenses.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orjson-3.7.9.tar.gz (946.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

orjson-3.7.9-cp311-cp311-manylinux_2_28_x86_64.whl (148.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

orjson-3.7.9-cp310-none-win_amd64.whl (200.3 kB view details)

Uploaded CPython 3.10Windows x86-64

orjson-3.7.9-cp310-cp310-musllinux_1_1_x86_64.whl (464.0 kB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ x86-64

orjson-3.7.9-cp310-cp310-musllinux_1_1_aarch64.whl (444.9 kB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ ARM64

orjson-3.7.9-cp310-cp310-manylinux_2_28_x86_64.whl (148.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

orjson-3.7.9-cp310-cp310-manylinux_2_28_aarch64.whl (254.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

orjson-3.7.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (275.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

orjson-3.7.9-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (280.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARMv7l

orjson-3.7.9-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (475.2 kB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)macOS 10.9+ x86-64macOS 11.0+ ARM64

orjson-3.7.9-cp310-cp310-macosx_10_7_x86_64.whl (266.9 kB view details)

Uploaded CPython 3.10macOS 10.7+ x86-64

orjson-3.7.9-cp39-none-win_amd64.whl (200.3 kB view details)

Uploaded CPython 3.9Windows x86-64

orjson-3.7.9-cp39-cp39-musllinux_1_1_x86_64.whl (464.0 kB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ x86-64

orjson-3.7.9-cp39-cp39-musllinux_1_1_aarch64.whl (444.9 kB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ ARM64

orjson-3.7.9-cp39-cp39-manylinux_2_28_x86_64.whl (148.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

orjson-3.7.9-cp39-cp39-manylinux_2_28_aarch64.whl (254.6 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ ARM64

orjson-3.7.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (275.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

orjson-3.7.9-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (280.4 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARMv7l

orjson-3.7.9-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (475.2 kB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)macOS 10.9+ x86-64macOS 11.0+ ARM64

orjson-3.7.9-cp39-cp39-macosx_10_7_x86_64.whl (266.9 kB view details)

Uploaded CPython 3.9macOS 10.7+ x86-64

orjson-3.7.9-cp38-none-win_amd64.whl (200.1 kB view details)

Uploaded CPython 3.8Windows x86-64

orjson-3.7.9-cp38-cp38-musllinux_1_1_x86_64.whl (463.9 kB view details)

Uploaded CPython 3.8musllinux: musl 1.1+ x86-64

orjson-3.7.9-cp38-cp38-musllinux_1_1_aarch64.whl (444.9 kB view details)

Uploaded CPython 3.8musllinux: musl 1.1+ ARM64

orjson-3.7.9-cp38-cp38-manylinux_2_28_x86_64.whl (148.4 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ x86-64

orjson-3.7.9-cp38-cp38-manylinux_2_28_aarch64.whl (254.6 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ ARM64

orjson-3.7.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (275.4 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

orjson-3.7.9-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (280.5 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARMv7l

orjson-3.7.9-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (475.0 kB view details)

Uploaded CPython 3.8macOS 10.9+ universal2 (ARM64, x86-64)macOS 10.9+ x86-64macOS 11.0+ ARM64

orjson-3.7.9-cp38-cp38-macosx_10_7_x86_64.whl (266.7 kB view details)

Uploaded CPython 3.8macOS 10.7+ x86-64

orjson-3.7.9-cp37-none-win_amd64.whl (200.1 kB view details)

Uploaded CPython 3.7Windows x86-64

orjson-3.7.9-cp37-cp37m-musllinux_1_1_x86_64.whl (464.1 kB view details)

Uploaded CPython 3.7mmusllinux: musl 1.1+ x86-64

orjson-3.7.9-cp37-cp37m-musllinux_1_1_aarch64.whl (445.0 kB view details)

Uploaded CPython 3.7mmusllinux: musl 1.1+ ARM64

orjson-3.7.9-cp37-cp37m-manylinux_2_28_x86_64.whl (148.6 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.28+ x86-64

orjson-3.7.9-cp37-cp37m-manylinux_2_28_aarch64.whl (254.7 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.28+ ARM64

orjson-3.7.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (275.5 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

orjson-3.7.9-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (280.6 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ ARMv7l

orjson-3.7.9-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (475.3 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ universal2 (ARM64, x86-64)macOS 10.9+ x86-64macOS 11.0+ ARM64

orjson-3.7.9-cp37-cp37m-macosx_10_7_x86_64.whl (266.8 kB view details)

Uploaded CPython 3.7mmacOS 10.7+ x86-64

File details

Details for the file orjson-3.7.9.tar.gz.

File metadata

  • Download URL: orjson-3.7.9.tar.gz
  • Upload date:
  • Size: 946.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.13.1

File hashes

Hashes for orjson-3.7.9.tar.gz
Algorithm Hash digest
SHA256 338506ba5e1914569f5f357ad90b2695df978df68d64e2047588a3d7589fa954
MD5 596edea3d3fdeec367514090bc38a88f
BLAKE2b-256 4cf6b66f9c76c20bf5a7fc508340f0ed82d650758bcc9d31069476c289d6a837

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1058bc60fef70ad7e7d3ac990d558fb06a9abb7d6f1d2f11f184038f00f2747e
MD5 76903578ad64f160d7fed91b782b42ea
BLAKE2b-256 08e3fcddffd6f3cd063c6e0dcc3ef57e9e3d7628a238c970b3331831903343aa

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp310-none-win_amd64.whl.

File metadata

  • Download URL: orjson-3.7.9-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 200.3 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.13.1

File hashes

Hashes for orjson-3.7.9-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 a389815f761f69626d27313b92f117e6e18b21de066078318140413e2c8288c9
MD5 564797d538305238009ec03cb49d3538
BLAKE2b-256 22eba015843f77f2acba2e353a0082f4dd78f38f92cdb1d559079706d483f65d

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 5dfa75a5ea0ad30cb5b3085e0939d643d68c9a66999f0bb4cc3c30a12505b4a2
MD5 2ec1bcb04766db58c7d07caa099e73b7
BLAKE2b-256 d501788dd62c2a8deaa92a634bf752c45f5574c39565127e5184dc5d728b03a0

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp310-cp310-musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp310-cp310-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 559dcf2413c866e201d9c9ac7101f7f94d092df81b5525c0f5cd257db7cbfb91
MD5 13c88f3701c48afb337e979c152a68d1
BLAKE2b-256 fe9c1c52ea00e7b5389522a791c59e091e3758488c087b8127ffd4c274083acd

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 67b2301fd9d3bacd080dd4f7eb6d5a156bb4cf469c52a7886b5e643d826b9bce
MD5 fca618f5d0b508c14c73a1a3018faedb
BLAKE2b-256 9f7c658c6ca17dbcd5eb114b8ae11f56a179d23524a4ecc5bc0781ea80d4eacb

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f038c4145e3b3c8c1867e2e126b7c6a2e62c59467fed79d3b242f1b1f98afae7
MD5 3dca67724edec2af727e0e470336e606
BLAKE2b-256 a9540db81b5839bc6999a1126a9ebbcb8a7abc0288189f7df98cdd3f7d210d9f

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 85d57f84516a7eee647d7d21a14eca927cb0a84f65d3510efad9b3a48f264dc4
MD5 aca1931e932a7cbdb28fb6de188f29a1
BLAKE2b-256 8efc604497a81822e66ea6b291918b7e8264966f875edb3a50a46d35d257080e

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 6a5ffb201b6aeaab81d4e93497d245f801232aeb3e3493c75d69aa3955e25e0a
MD5 7550d81fc369e0ffa62ff566b21e1264
BLAKE2b-256 3a041b5605873550117a9edc1b82559dab9354e0822825661a796c15834dc4e8

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 98bc76fffe759c6d56aed9ab44a9cda45ec72978775c3ef2f7d9028abcfcb648
MD5 4322e6c6c8012da321cc1ee3c77aa56b
BLAKE2b-256 7368e06d36eea275be4dc64894ccfdaf7e1d57540b5456352771aedcc372e650

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp310-cp310-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 8e8c9c828885c7af18467f02338b21ac1b050e7f3f4e00ee3c87a75c1db9b8e9
MD5 4cec35c56c121d6d61c9f54744686d04
BLAKE2b-256 ee8a777ca74646845c38b47f4607797a0ccd042c762fc72de545709f58508ab5

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp39-none-win_amd64.whl.

File metadata

  • Download URL: orjson-3.7.9-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 200.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.13.1

File hashes

Hashes for orjson-3.7.9-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 8f10e57911209ede27780509cb44b5777fe3aa62f74bac4d886e7788abb67745
MD5 4e06e200c06f88bcaa3ba269491eeeec
BLAKE2b-256 9625c3198fb51840e179833b73846e25ff769feefaacb14445962d419d2af64b

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp39-cp39-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 f7e92a54197ab8718d7e5aaee53924e675ffc18353a8f756845b29370ab10793
MD5 59486555ea7feb04ef7340f14ab0c22e
BLAKE2b-256 ed2f7fe261eb20cf83c986a94a8712c13e08656dc8147524da696445dc29337d

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp39-cp39-musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp39-cp39-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 80a67af8f589ce465b60489caf6ab1c045c1bc62135a699ce958c1c180934512
MD5 80e121b6699c4eba8a312587a489315b
BLAKE2b-256 c6dc72485ccf5ad82025a21223f6466a241288b82c948c17b2dac69da6c23e26

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3d2aa7ab11c939d4aba098fa23bc0fa102cff6b6128452a00e43bf58ef203ce0
MD5 f3a05c2c2b1f146671e86b5223ba08e1
BLAKE2b-256 c37fe4b039e68e67fcf094bf0924cd4d64b5e55c203c655b571879ec77b91331

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp39-cp39-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 715227fa94fcf7a00aa7737c6771c9ea664b3feec855cf6644bbeea7acaaefb7
MD5 64e8fa42e2fde589b8f37563ce1af8ee
BLAKE2b-256 cbbd368ba152fc9379dec1c855b0cfcce6429d69014674f302b08237610c2fdf

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 af203c3717198b6bf3d007a6d387d7e04ecba2171ef57b423df0fa2df6d10e75
MD5 4ea098cabbd4c434d0981ad084257b81
BLAKE2b-256 3c324365fcb70a42a190ceeafa9b6032c958f2e21db4fd5f44e98321768ccbe8

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 0ad8bb39316a45e748f026b8e8350971f1008699cfed1c2bf9d73c179d9121b8
MD5 e87678f185c91555c6d6f4e84e3b7b87
BLAKE2b-256 b141a3042f3b5728e3df1d5ecb7b0c699766c572a67164abf374ecde724b7bd6

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3451a8436ef2543907688313d1b49b9f1611f4ad27c83663aae0ed160b8bcea4
MD5 9b2a911216b4ec0193f2a3ac5a2a510f
BLAKE2b-256 4f86159812f446c06edc7fe5d1188a8978bb064ab052ffcff533b1020ac01e73

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp39-cp39-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 e9974d13f24f4a9279417f0e804c2524b477095c6cd1b1f21bbb20de4d4ed06b
MD5 e2b546dbf6fbc4aeeccebed5add5b52f
BLAKE2b-256 72e956d840599926a98bc8cbbf60a0db7b5cde6c482259ab58abcfb63e54fda2

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp38-none-win_amd64.whl.

File metadata

  • Download URL: orjson-3.7.9-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 200.1 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.13.1

File hashes

Hashes for orjson-3.7.9-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 0e28a3c57f891c2c52652acd5eb3dada72a4a739dbbcf5049ca1b08088eb67a0
MD5 01865a76dcc2269f828dfbfc40bd93fe
BLAKE2b-256 c6d053aaf8079f1a29e04bd1c4a5fd8eb4ba550c0f3b3af1881397cc06420764

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp38-cp38-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 78c80506057ad4c098f2faf526358f8fd48902b6703cffac3da9056f6eaa6d53
MD5 300aae6909683d65e6d0a4d4a1bab87a
BLAKE2b-256 4f40fb39f3a26ab910115254623b06645d129efb3246d757a3f11db75bf6e4ca

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp38-cp38-musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp38-cp38-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 0275ea0e6d677e993dc1cd71d33b071d6a9392bc17cc7fe06b994fceae6371cb
MD5 37c773615fe9db4cbbf8be297e872127
BLAKE2b-256 df43e8f38e63b3881a11a57d4e1a11f1845d6622395531822da36d872a0b59d6

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a774af9e5948790e14e2f35ea476707f5a226b5419fefe9622e4e0e261fd4b5d
MD5 2e45a38a72e66b766fffe4fb37f36229
BLAKE2b-256 2733f685fff4a49b6551ecac3a0120161bb8feba20062ae4dd889fe2bbe6ad2b

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp38-cp38-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7e0492f688b11ec3dd1bbe4dc0d93b81f0693653fefef015c7adcb3a5b25761f
MD5 5a6896674343bf99a636faa907835a4b
BLAKE2b-256 8eaaba05d5ad18cb54f6651928ca2787510b80d80fe1620db1c21da65e6bb3f7

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8959a67b9e98f2bef6fcb59a48b7df819a4b78d56ea0a4b1c30412bdc87e832a
MD5 33bca548ad54d029c12deccb0f9570ba
BLAKE2b-256 32aca647a28ee247c9753e37a5a559756892e5d730ae684fe1f5fde060db0097

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 fe64124d57c96bd72c0b9b3a334c5919a03971a3c486a94dfdb60c8f565faf72
MD5 38d6b89128bd3e4edca51be80c90c8b3
BLAKE2b-256 58057e8879d614bba21c22baaafeafdf236b7da34736f17081d500b8da176d76

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b0ab6d4d85efc0b1561b658fadb90fcdbac35106420b2c453d3e2cd396f0de06
MD5 9151d4ba0ef6cf65cf2bb3e64075bd6c
BLAKE2b-256 debb84c01c80581bef546b10037e2e64ee7dbc68a7200ae182dedbb1944ca4ea

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp38-cp38-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 a3f5a83e9e0c8e73230f56ff9b66243ad2c0e527d238566ce820b09bf2577f26
MD5 e4c9d89b0005b35c0f645bf58ecf8573
BLAKE2b-256 05b6e920d28d5ca7ccbfb5143aee86821f7db7924d0d590a25168acf9501b3bb

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp37-none-win_amd64.whl.

File metadata

  • Download URL: orjson-3.7.9-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 200.1 kB
  • Tags: CPython 3.7, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.13.1

File hashes

Hashes for orjson-3.7.9-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 1e02d1c0dbcab89f99b09d1617a7351a8e66d9615ef814f73b7660919ade8e93
MD5 7605f77a5fd56ef52229b6306fc5de75
BLAKE2b-256 9508eeae96a672078dcc5974f858156ba27211657f3310fa740b314527ff8a97

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp37-cp37m-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 8403e56229c895c7df3c4e24638bd83010eae40d803ca6f2043d92793bf1f07b
MD5 882890872eb268b9be140536eac686e4
BLAKE2b-256 836d88d6c2e71fd7cd9e4abe110e66f70a1a3ae6fd7400b66f5465ced645b09a

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp37-cp37m-musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp37-cp37m-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 0acd3881c5cda79bd7d3c936e41e6ad601edbd0aa49d2b039a3e212a712c0f3e
MD5 0b542fb995b8accfed26a2d4266ba7e8
BLAKE2b-256 0f0bff138001995d4314292ab673db74ef747da4469e65b9b97270f7a06b72b2

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp37-cp37m-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp37-cp37m-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c7e72e9ae5558274359774a12269d93916878d017bbb1f0fb19c5f6fabe6f2a8
MD5 ba504183990c334ca6fecf19a673fde2
BLAKE2b-256 536353b26238c0a7938c25ab89fcdde06fab333ddb7dd8c9189b3c699c6ba363

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp37-cp37m-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp37-cp37m-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a24145c4995561da7cefb888675a5724e6e8591a560c0254aa4d82338f5ce55c
MD5 3a8dd0ba17d8de742eb696fa98261f59
BLAKE2b-256 3dc5002281c666019f2a1a258e2d830fd0339fc2ce6848d803977463a0c07e6a

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a4d09f94bc9f65c049b4100fe13532392c65ce71d6f1f1d651fda9b848a2dfc2
MD5 6fe2be3fae0054c0f7b39e7301aee2fa
BLAKE2b-256 8b5d621d03727e8534fad827d28beaf617d0ddb2759e81bde11e5ccd6ece5efb

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 113a4da99b751c8bf6c9d6c3e9d84e51e25387ded2c3f0f4d6d3493e761a24ec
MD5 b7f3d04f0840f4d8ae689eff78df7654
BLAKE2b-256 95b2f11b0a91e439a4b842bfc98c7df60bda310b86c2a0e88c50ce55cce8f84a

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 2745168f605977bfdd895d2201e88d2f96afd35758e27e8d3302692ad5126e55
MD5 65cd712eee7e72ddc95ee418680cf7e2
BLAKE2b-256 17483050f037c897103f3e93120dcf6bc53b054a1c7ee2f4d7b5686613330450

See more details on using hashes here.

File details

Details for the file orjson-3.7.9-cp37-cp37m-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for orjson-3.7.9-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 b28ecb20417375946ad142697c4e34aab035b25e723035b44cf10b8c062ee42f
MD5 0ef68b2748f9d8c476dec424f09bedb0
BLAKE2b-256 9910f995d49bdbcb260f2c18e0bd48206e740e8c076d82651cbbf054e1f7d324

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page