mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
38 lines
1.0 KiB
Python
38 lines
1.0 KiB
Python
from collections.abc import Callable, Iterator
|
|
from typing import Any, Pattern
|
|
|
|
ESCAPE: Pattern[str]
|
|
ESCAPE_ASCII: Pattern[str]
|
|
HAS_UTF8: Pattern[bytes]
|
|
ESCAPE_DCT: dict[str, str]
|
|
INFINITY: float
|
|
|
|
def py_encode_basestring(s: str) -> str: ... # undocumented
|
|
def py_encode_basestring_ascii(s: str) -> str: ... # undocumented
|
|
|
|
class JSONEncoder:
|
|
item_separator: str
|
|
key_separator: str
|
|
|
|
skipkeys: bool
|
|
ensure_ascii: bool
|
|
check_circular: bool
|
|
allow_nan: bool
|
|
sort_keys: bool
|
|
indent: int
|
|
def __init__(
|
|
self,
|
|
*,
|
|
skipkeys: bool = ...,
|
|
ensure_ascii: bool = ...,
|
|
check_circular: bool = ...,
|
|
allow_nan: bool = ...,
|
|
sort_keys: bool = ...,
|
|
indent: int | None = ...,
|
|
separators: tuple[str, str] | None = ...,
|
|
default: Callable[..., Any] | None = ...,
|
|
) -> None: ...
|
|
def default(self, o: Any) -> Any: ...
|
|
def encode(self, o: Any) -> str: ...
|
|
def iterencode(self, o: Any, _one_shot: bool = ...) -> Iterator[str]: ...
|