mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Make object_hook of json.load and json.loads optional (Python 2) (#757)
This commit is contained in:
committed by
Guido van Rossum
parent
b33c2c6158
commit
f39f9bf694
@@ -36,7 +36,7 @@ def dump(obj: Any,
|
||||
def loads(s: Union[Text, bytes],
|
||||
encoding: Any = ...,
|
||||
cls: Any = ...,
|
||||
object_hook: Callable[[Dict], Any] = ...,
|
||||
object_hook: Optional[Callable[[Dict], Any]] = ...,
|
||||
parse_float: Optional[Callable[[str], Any]] = ...,
|
||||
parse_int: Optional[Callable[[str], Any]] = ...,
|
||||
parse_constant: Optional[Callable[[str], Any]] = ...,
|
||||
@@ -46,7 +46,7 @@ def loads(s: Union[Text, bytes],
|
||||
def load(fp: IO[str],
|
||||
encoding: Optional[str] = ...,
|
||||
cls: Any = ...,
|
||||
object_hook: Callable[[Dict], Any] = ...,
|
||||
object_hook: Optional[Callable[[Dict], Any]] = ...,
|
||||
parse_float: Optional[Callable[[str], Any]] = ...,
|
||||
parse_int: Optional[Callable[[str], Any]] = ...,
|
||||
parse_constant: Optional[Callable[[str], Any]] = ...,
|
||||
@@ -95,4 +95,3 @@ class JSONEncoder(object):
|
||||
def encode(self, o: Any) -> str: ...
|
||||
|
||||
def iterencode(self, o: Any, _one_shot: bool = ...) -> str: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user