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, and 3.10. 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.06 0.07 1.0
ujson 0.18 0.19 2.8
rapidjson 0.22
simplejson 0.35 1.49 21.4
json 0.36 1.19 17.2

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.88 1.73 1.0
ujson 3.73 4.52 2.6
rapidjson 3.54
simplejson 11.77 72.06 41.6
json 6.71 55.22 31.9

rapidjson is blank because it does not support pretty printing. 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.5 0.92 1
ujson 1.61 2.48 2.7
rapidjson 2.17 2.89 3.2
simplejson 3.56 5.13 5.6
json 3.59 4.59 5

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.41 2419.7 1
ujson 1.8 555.2 4.36
rapidjson 1.26 795 3.05
simplejson 2.27 440.6 5.5
json 1.83 548.2 4.42

twitter.json deserialization

Library Median latency (milliseconds) Operations per second Relative (latency)
orjson 0.85 1173 1
ujson 1.88 532.1 2.2
rapidjson 2.7 371 3.16
simplejson 2.16 463.1 2.53
json 2.33 429.7 2.73

github.json serialization

Library Median latency (milliseconds) Operations per second Relative (latency)
orjson 0.04 23751.2 1
ujson 0.18 5498.1 4.31
rapidjson 0.1 9557 2.48
simplejson 0.25 3989.7 5.94
json 0.18 5457.6 4.36

github.json deserialization

Library Median latency (milliseconds) Operations per second Relative (latency)
orjson 0.07 14680.6 1
ujson 0.19 5224.3 2.81
rapidjson 0.17 5913.2 2.49
simplejson 0.15 6840.8 2.15
json 0.15 6480.2 2.27

citm_catalog.json serialization

Library Median latency (milliseconds) Operations per second Relative (latency)
orjson 0.7 1420.8 1
ujson 2.89 345.2 4.1
rapidjson 1.84 543.3 2.61
simplejson 10.06 99.4 14.29
json 3.94 254 5.59

citm_catalog.json deserialization

Library Median latency (milliseconds) Operations per second Relative (latency)
orjson 1.72 579.6 1
ujson 3.68 272.1 2.13
rapidjson 5.61 178.4 3.26
simplejson 5.06 198.2 2.94
json 5.09 196.9 2.95

canada.json serialization

Library Median latency (milliseconds) Operations per second Relative (latency)
orjson 3.65 274.5 1
ujson 12.59 79.3 3.45
rapidjson 34.24 29.2 9.39
simplejson 57.43 17.4 15.75
json 36.03 27.6 9.88

canada.json deserialization

Library Median latency (milliseconds) Operations per second Relative (latency)
orjson 4.18 240.2 1
ujson 9.29 107.8 2.22
rapidjson 23.56 42.4 5.64
simplejson 21.93 45.5 5.25
json 21.34 46.9 5.11

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.4 on Linux (amd64) with orjson 3.7.0, ujson 5.3.0, python-rapidson 1.6, 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.

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.54 and the maturin build tool. It benefits from also having clang. The recommended build command is:

maturin build --no-sdist --release --strip --cargo-extra-args="--features=yyjson"

To build without use of clang, do not specify --features=yyjson. Deserialization is much faster if built with this feature.

There is a minor performance benefit on at least amd64 to building on nightly with --features=unstable-simd. It may be more significant on other architectures.

The project's own CI tests against nightly-2022-06-22 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.4.tar.gz (640.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.4-cp310-none-win_amd64.whl (189.1 kB view details)

Uploaded CPython 3.10Windows x86-64

orjson-3.7.4-cp310-cp310-musllinux_1_1_x86_64.whl (461.9 kB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ x86-64

orjson-3.7.4-cp310-cp310-musllinux_1_1_aarch64.whl (441.3 kB view details)

Uploaded CPython 3.10musllinux: musl 1.1+ ARM64

orjson-3.7.4-cp310-cp310-manylinux_2_28_x86_64.whl (273.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

orjson-3.7.4-cp310-cp310-manylinux_2_28_aarch64.whl (250.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

orjson-3.7.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (273.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

orjson-3.7.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (245.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARMv7l

orjson-3.7.4-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (446.8 kB view details)

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

orjson-3.7.4-cp310-cp310-macosx_10_7_x86_64.whl (261.7 kB view details)

Uploaded CPython 3.10macOS 10.7+ x86-64

orjson-3.7.4-cp39-none-win_amd64.whl (189.1 kB view details)

Uploaded CPython 3.9Windows x86-64

orjson-3.7.4-cp39-cp39-musllinux_1_1_x86_64.whl (461.9 kB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ x86-64

orjson-3.7.4-cp39-cp39-musllinux_1_1_aarch64.whl (441.3 kB view details)

Uploaded CPython 3.9musllinux: musl 1.1+ ARM64

orjson-3.7.4-cp39-cp39-manylinux_2_28_x86_64.whl (273.6 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

orjson-3.7.4-cp39-cp39-manylinux_2_28_aarch64.whl (250.2 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ ARM64

orjson-3.7.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (273.4 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

orjson-3.7.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (245.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARMv7l

orjson-3.7.4-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (446.7 kB view details)

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

orjson-3.7.4-cp39-cp39-macosx_10_7_x86_64.whl (261.7 kB view details)

Uploaded CPython 3.9macOS 10.7+ x86-64

orjson-3.7.4-cp38-none-win_amd64.whl (188.9 kB view details)

Uploaded CPython 3.8Windows x86-64

orjson-3.7.4-cp38-cp38-musllinux_1_1_x86_64.whl (461.8 kB view details)

Uploaded CPython 3.8musllinux: musl 1.1+ x86-64

orjson-3.7.4-cp38-cp38-musllinux_1_1_aarch64.whl (441.2 kB view details)

Uploaded CPython 3.8musllinux: musl 1.1+ ARM64

orjson-3.7.4-cp38-cp38-manylinux_2_28_x86_64.whl (273.5 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ x86-64

orjson-3.7.4-cp38-cp38-manylinux_2_28_aarch64.whl (250.1 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ ARM64

orjson-3.7.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (273.3 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

orjson-3.7.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (245.8 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARMv7l

orjson-3.7.4-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (446.5 kB view details)

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

orjson-3.7.4-cp38-cp38-macosx_10_7_x86_64.whl (261.5 kB view details)

Uploaded CPython 3.8macOS 10.7+ x86-64

orjson-3.7.4-cp37-none-win_amd64.whl (189.0 kB view details)

Uploaded CPython 3.7Windows x86-64

orjson-3.7.4-cp37-cp37m-musllinux_1_1_x86_64.whl (461.9 kB view details)

Uploaded CPython 3.7mmusllinux: musl 1.1+ x86-64

orjson-3.7.4-cp37-cp37m-musllinux_1_1_aarch64.whl (441.3 kB view details)

Uploaded CPython 3.7mmusllinux: musl 1.1+ ARM64

orjson-3.7.4-cp37-cp37m-manylinux_2_28_x86_64.whl (273.7 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.28+ x86-64

orjson-3.7.4-cp37-cp37m-manylinux_2_28_aarch64.whl (250.1 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.28+ ARM64

orjson-3.7.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (273.4 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

orjson-3.7.4-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (245.8 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ ARMv7l

orjson-3.7.4-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (446.8 kB view details)

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

orjson-3.7.4-cp37-cp37m-macosx_10_7_x86_64.whl (261.6 kB view details)

Uploaded CPython 3.7mmacOS 10.7+ x86-64

File details

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

File metadata

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

File hashes

Hashes for orjson-3.7.4.tar.gz
Algorithm Hash digest
SHA256 90329f9f4c0cbf41ccc610a812c0c83011a818b45230ebd5a7dd1b746bc656cd
MD5 230ff70e87ec282a4ea023c0e74f59e3
BLAKE2b-256 9de761c005f60f0b6ea66f5cc77168200c53bbc23bac3443892a35a159d33a6c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for orjson-3.7.4-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 9513be4d31893bfcc53c1a3bc0021563e0868a7c27c6a5e5a4275611adbdb07a
MD5 f964b5e3a3065f069e399a2a0bb658b1
BLAKE2b-256 47341c9958a4988ac26968bc80ed1b6f6ecd8756e5b8907af355934f57f4ceb8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 0bfa66524624e806c0cdc17fe308de090932869d917c0bdafeb6f5a6b5f919e0
MD5 c4df50f6d148b87c61e452ecde5f15cc
BLAKE2b-256 6d81289fefd9e3acb6e2eab0cfefca6dae5065cdf1a448a61b2d86e5b02cecdf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp310-cp310-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 e09f201f9dc3cd187a0551e72d87baf92556b3926fd18722e2e5352697fad701
MD5 e5358423dae28e4453a8e7763714b963
BLAKE2b-256 2928f42eb856190ce73fcba89a6b830a61aeef740f03cff61d71a0562885338a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 34a11490b9c5bbc7874a536b7313173b5d7c6efbd5caa29ee0b37480a1939b93
MD5 3d776bb7a4945d4d2126d21bf3c38a7d
BLAKE2b-256 3763f2dcd3fcf1558aae775eb307406255d5146e0b0389e8d67f3e344ff13d37

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2f6d257129dfb19c98c1e101009ae71bba56d41a2264d62c0cf53d8533db1be4
MD5 25ded41da75f8f4f6a41fa8faf1b8b11
BLAKE2b-256 c3323c28cad88daec3d71edb3b5c33d60a49a919d5b371b3b12c23819d683df4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0563d2994b182a87cc101c25d702c462352429d9c0a53d2acc3a7cbbaa65e703
MD5 d5b95ca56cf477c851604e6b4fa01b56
BLAKE2b-256 702fd741766bd44324ba717b2e5925d0d4931207c71a520cf841d2bd93783307

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 9c228accf4235307abb3940c8635875bc0eded1a103911fd1b09b0ba7e440ae5
MD5 40579d9b33c5949d0653b52b8d89cacc
BLAKE2b-256 92618acd98c0ee4b32a06f353ce6c9f1e8b686e4b2933b5281e0d7be93787995

See more details on using hashes here.

File details

Details for the file orjson-3.7.4-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.4-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ca91c1f910898b1340f2d1573a7909acecb10ec94eb3051c080d7c5835349cda
MD5 f3b87abc1c58da5d930bbd6ce43d60b0
BLAKE2b-256 38f37d714b15dd3ecd90c21936705610ab3a6a49d08c1c69c1bebc5e579c726d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 ded60f021aeef73a5b0d96d303d72013bbc3107b28ef2423e9050675bfe7f644
MD5 b65b9082dbe27ed5f04a72aad48c2c92
BLAKE2b-256 0d98f6fbc94345e079dbbe145d61927befbfef10549a062ddfae267a44bf92e0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for orjson-3.7.4-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 adc41d0eb49fdaf51998aa6c5cb2941319d0718630bd338739c9bccd5c587a18
MD5 a8568a3d6c86e6e858347f6f00c64e9f
BLAKE2b-256 b8ed24c33e09455711923d4c947cefac9292c29767c3f78fed281714409dadfa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 ec207b6518414d1a9f7d3d0b18d60933c141320e06a241b3b1a1c6b6198b3e75
MD5 0531423efe3d71dfc8a8ed126cab26a4
BLAKE2b-256 c04467e70d7c7754b6050bbc96d168bd5e9660d96e02b724055a4c04875688de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp39-cp39-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 b4a518f201e7960dadcc9e91e4e9bef9b27de160d4944c9ddf58c96c9f763d5a
MD5 6ebe69d50cda44b57d7254f4d216dc93
BLAKE2b-256 58b55779cd4d13b23d6aec0052f9c99d5b570739e47a7fdda50bf54d3b7f1dc8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 599562310bc3d3b1db45ecf4586eeeea2bd7e6fb3ed7eab5ec90f1499469e5d8
MD5 3a50f61ceb597fe8ac15b4b29d9c5342
BLAKE2b-256 bb537a1b9e6c9562713246654c3b2e8aa1bd597b09eb0ac80f71c6af98ecf343

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0e6449d4e49ef4468f1b71ea290185626a083a1eddda79bf1ac72338725ec070
MD5 e479024e5baf15ad0cd9e26a14ba6e92
BLAKE2b-256 8ba1b8bad7a19feee3eb68c7ae2264c8c22f3cbc03344d3d2378ec1a67ff313a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1b6cd3ad6254f658387ef34662f637ef3a81fc60a97bdeaf8d6d959d405b5284
MD5 e65445169c36f456f8ca3aa9c27a2b4a
BLAKE2b-256 603cf1dee0e046bf3917a2ad8d7c84677c0c67769a305f3e40f33f88498e0394

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 7b24e435e1561284805d865c3bcae3eb7768639b3f08fdabe479cb064ebfda73
MD5 70c69c491f92353708f3a5f898322164
BLAKE2b-256 ce4711ca4b902a706d7ca6fc11e5b4e128cfa40e7e974b4b1a163b274d60866f

See more details on using hashes here.

File details

Details for the file orjson-3.7.4-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.4-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a418020336a3a120d6edc1c41c953de26c01cae819ec27b601cefb3e21f3b336
MD5 f6b20c1c1c0f6d0b6a909ed5dd8485d1
BLAKE2b-256 3748b3ebd161f8949cfd9f613bb71e9c680f1bb8eaaff4c590115163570cb6e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 a1c92a2f5e6093b6a97e68e3ffa1ec7a6bafcdd69ee6fe3c94421f132cb21bad
MD5 e435aeb1e768f3fb59d273a5a08ea699
BLAKE2b-256 42fa98f1fbbbac8d341b47d40780d9f70c0a5567def6f91dacfbe7aafd29a086

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for orjson-3.7.4-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 5c381346658af45e725731b02957c12ebb4ca9647380fdd5b675d2e554545c2d
MD5 870df7c85cfa4039607ff1e73b7ad824
BLAKE2b-256 5f0156d9ee5fff9311280e810de6174435879212b952c6eab355fcd3cf75e96b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 bbf4037106b211607f02a56eea0784d8fc7e3865071f1ae119e401c0ac2f30f5
MD5 adad33017657f5d4e683134c4055923c
BLAKE2b-256 893291bd36da4193b5bb1c5806e9ddaecd97456d6b4bb3102ba5afe17c80624c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp38-cp38-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 6e7cb2951d74c71dba37ea1d2b59b4b40b255666e870c881c09d0c361abcd335
MD5 7297237e0908c71d656a17537b29067f
BLAKE2b-256 eabf3695a9163b9d2cf0317a5d86ac9c3db9a84df24a35f7ff55d3d6ed27902e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 59ac46ced242a4f46f3636e3c01d6942e100572fb3dd23d18505749317175a0b
MD5 871d3d700cae330f94fe5f7636fb0e4e
BLAKE2b-256 259e9be40bd8c79d97421ec8dfd49064a4869b0db59ecf79daf9bf5194cb5f78

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3bec324fde4cfcc69f938b0e0d87b91116c8fe462ecd255942ee35dd105fad1f
MD5 1d47a4a0abaea506e2286c969afc7fd2
BLAKE2b-256 02f4a04e2c48a6b862f733591ff88196589c1cdb668a47e7489ef9776aeec619

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c8817d42ae5d39ddabc4f064c6f1919500f6665e79256fc5389741ae3cb1aa38
MD5 975f4b8f1f362e9fef423d58689d44ed
BLAKE2b-256 0df78675ea5854fd5b49ccd395e96abca90a2f8b5b0a52f9b321f504dd356b37

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 3a3a70f5fe04b99f48367a551bb8615d7420152479a80fe11561ff23add07476
MD5 5a9541efadc11688e5eb4390f74417df
BLAKE2b-256 e7085542ecf2b945d770d865827f6c7cdf84532e464e12129dc8a40448154a66

See more details on using hashes here.

File details

Details for the file orjson-3.7.4-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.4-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7e6c281a1bb9ae5e43ba91795d03e877fbe19a00383c883f87f48d9bbfd33fe1
MD5 0b5c324fa96f56566f2a3506f9e94cdc
BLAKE2b-256 8e4a8d2d03d0883d79a5511f6dc6f2b142077b87e55cb9fb2b8bf617a68cb1a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 dbff962d7ff7f307dbe81b26213684f05b13778f317e784d8aa50e70ee55e33c
MD5 4f99c469b2af201c16c68765ee2d41f8
BLAKE2b-256 70b8ce0701e2baf6d28c236add51af3ba3b204e77cb246556f49a62a8b5e5911

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for orjson-3.7.4-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 ef930a2c54cb125c252a3d5291082bdbdf69ad272ca7c3325fb99c08b311da62
MD5 e72ec9a1fa04ac98fb60784a6d98f0a4
BLAKE2b-256 b65df89ca94f4013229318f204f1ed9b2e3f3f47c9dc5c926293344c7d25618f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 172e67ea0a28c67ccd6baa9195bef17c9b37c56e02e34c04c16117417421ddb6
MD5 222d51dd24c5b226cbb3debfef228555
BLAKE2b-256 dc58cbe830fca2a01e3fbdf36a722906b755a32bcaeacc0e20edeccf8b7b247f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp37-cp37m-musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 fbfeb6288319cf49ca965635d904a06a83e4a247415c461653b311a17621f447
MD5 73f4c9f73be765727cd8d74de7cbac6e
BLAKE2b-256 af1b2d1902754c2f5a7a2b5327bb569c60d058c4632087e9480bf70810e38853

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp37-cp37m-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 36fefb9baf43eb973058c8289e0d38222f108fd919d3490460c4707392b601d8
MD5 95c7f401f48457b7c240217654bcfe45
BLAKE2b-256 cee88d1dac4f5c2236269991929dffb054930132a286596ad7147657fa2e1a09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp37-cp37m-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 764d22259ee25907988d3460207e98c75d8dcbdf0a57c98545726ad594666fbd
MD5 911b43f1d10dec309b46fecfad0a1d3a
BLAKE2b-256 6790839440f3f6a080980171a92283eb243a617733a52e75f375c8441bc79049

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8990e17bfdf29879cce5e40ecebb561b35d3ed5a9e77139e0c85f793911c71b6
MD5 da92c49f9bb886cf9fe214c41c05f926
BLAKE2b-256 ce49595cd8a0efd3cde3234ae9ab79854c06b00fa3cc037ac66bde299334fb34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 01b418ed2fbad75d14b18507d9c75f9556956ad4b88c69b0b4a2de96fec52411
MD5 afccd0ae46f433d16498f4860b7caa74
BLAKE2b-256 8f4cdc80c17aa29635e178047c27924453ce5b7a3e10c348fef50929f48c9dd3

See more details on using hashes here.

File details

Details for the file orjson-3.7.4-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.4-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4c5b41189037d71a0c4567fcb7da8dba871c6a830912655d677108edca6c66d9
MD5 cc89e96cd87ff4a50e5dd35b015aacb4
BLAKE2b-256 befea6807a0c97ca9cd998ce832a648df4079ea5f3888fd0ed75a3da17ee01fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orjson-3.7.4-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 85603124d71adf682bd3b355b2d735c223107b8c66d998938f0cea23da596ed6
MD5 abebe84a89618fefeafb7ea37c30e88b
BLAKE2b-256 7a0097ad1a6c4869ffe2d4f402cb15408cd27d9052d15e55ef42e20914b14b71

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