1 from _typeshed import SupportsRead
2 from typing import IO, Any, Callable, Type
4 from .decoder import JSONDecodeError as JSONDecodeError, JSONDecoder as JSONDecoder
5 from .encoder import JSONEncoder as JSONEncoder
11 ensure_ascii: bool = ...,
12 check_circular: bool = ...,
13 allow_nan: bool = ...,
14 cls: Type[JSONEncoder] | None = ...,
15 indent: None | int | str = ...,
16 separators: tuple[str, str] | None = ...,
17 default: Callable[[Any], Any] | None = ...,
18 sort_keys: bool = ...,
26 ensure_ascii: bool = ...,
27 check_circular: bool = ...,
28 allow_nan: bool = ...,
29 cls: Type[JSONEncoder] | None = ...,
30 indent: None | int | str = ...,
31 separators: tuple[str, str] | None = ...,
32 default: Callable[[Any], Any] | None = ...,
33 sort_keys: bool = ...,
39 cls: Type[JSONDecoder] | None = ...,
40 object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
41 parse_float: Callable[[str], Any] | None = ...,
42 parse_int: Callable[[str], Any] | None = ...,
43 parse_constant: Callable[[str], Any] | None = ...,
44 object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ...,
48 fp: SupportsRead[str | bytes],
50 cls: Type[JSONDecoder] | None = ...,
51 object_hook: Callable[[dict[Any, Any]], Any] | None = ...,
52 parse_float: Callable[[str], Any] | None = ...,
53 parse_int: Callable[[str], Any] | None = ...,
54 parse_constant: Callable[[str], Any] | None = ...,
55 object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = ...,
58 def detect_encoding(b: bytes) -> str: ... # undocumented