-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathujson.pyi
52 lines (49 loc) · 1.61 KB
/
ujson.pyi
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from _typeshed import Incomplete, SupportsRead, SupportsWrite
from collections.abc import Callable
from typing import Any
__version__: str
def encode(
obj: Any,
ensure_ascii: bool = ...,
double_precision: int = ...,
encode_html_chars: bool = ...,
escape_forward_slashes: bool = ...,
sort_keys: bool = ...,
indent: int = ...,
allow_nan: bool = ...,
reject_bytes: bool = ...,
default: Callable[[Incomplete], Incomplete] | None = None,
separators: tuple[str, str] | None = None,
) -> str: ...
def dumps(
obj: Any,
ensure_ascii: bool = ...,
double_precision: int = ...,
encode_html_chars: bool = ...,
escape_forward_slashes: bool = ...,
sort_keys: bool = ...,
indent: int = ...,
allow_nan: bool = ...,
reject_bytes: bool = ...,
default: Callable[[Incomplete], Incomplete] | None = None,
separators: tuple[str, str] | None = None,
) -> str: ...
def dump(
obj: Any,
fp: SupportsWrite[str],
*,
ensure_ascii: bool = ...,
double_precision: int = ...,
encode_html_chars: bool = ...,
escape_forward_slashes: bool = ...,
sort_keys: bool = ...,
indent: int = ...,
allow_nan: bool = ...,
reject_bytes: bool = ...,
default: Callable[[Incomplete], Incomplete] | None = None,
separators: tuple[str, str] | None = None,
) -> None: ...
def decode(s: str | bytes | bytearray, precise_float: bool = ...) -> Any: ...
def loads(s: str | bytes | bytearray, precise_float: bool = ...) -> Any: ...
def load(fp: SupportsRead[str | bytes | bytearray], precise_float: bool = ...) -> Any: ...
class JSONDecodeError(ValueError): ...