File: data.py

package info (click to toggle)
python-orjson 3.11.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,116 kB
  • sloc: ansic: 11,268; python: 6,796; sh: 105; makefile: 9
file content (26 lines) | stat: -rw-r--r-- 518 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
# Copyright Aarni Koskela (2021), ijl (2019)

from json import dumps as _json_dumps
from json import loads as json_loads

from orjson import dumps as orjson_dumps
from orjson import loads as orjson_loads


def json_dumps(obj):
    return _json_dumps(obj).encode("utf-8")


libraries = {
    "orjson": (orjson_dumps, orjson_loads),
    "json": (json_dumps, json_loads),
}


fixtures = [
    "canada.json",
    "citm_catalog.json",
    "github.json",
    "twitter.json",
]