Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions stdlib/json/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from _typeshed import SupportsRead, SupportsWrite
from collections.abc import Callable
from typing import Any
from typing import Any, Literal

from .decoder import JSONDecodeError as JSONDecodeError, JSONDecoder as JSONDecoder
from .encoder import JSONEncoder as JSONEncoder
Expand Down Expand Up @@ -58,4 +58,6 @@ def load(
object_pairs_hook: Callable[[list[tuple[Any, Any]]], Any] | None = None,
**kwds: Any,
) -> Any: ...
def detect_encoding(b: bytes | bytearray) -> str: ... # undocumented
def detect_encoding(
b: bytes | bytearray,
) -> Literal["utf-8", "utf-8-sig", "utf-16", "utf-16-be", "utf-16-le", "utf-32", "utf-32-be", "utf-32-le"]: ... # undocumented