update #loads param's type annotation
This commit is contained in:
parent
2b8b47817a
commit
62fbc59f3c
1 changed files with 6 additions and 3 deletions
|
|
@ -153,13 +153,16 @@ def dump(
|
||||||
_json.dump(obj, fp, **kwargs)
|
_json.dump(obj, fp, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def loads(s: str, app: t.Optional["Flask"] = None, **kwargs: t.Any) -> t.Any:
|
def loads(
|
||||||
"""Deserialize an object from a string of JSON.
|
s: t.Union[str, bytes, bytearray], app: t.Optional["Flask"] = None, **kwargs: t.Any
|
||||||
|
) -> t.Any:
|
||||||
|
"""Deserialize a string, bytes or bytearray instance containing
|
||||||
|
a JSON document to a Python object.
|
||||||
|
|
||||||
Takes the same arguments as the built-in :func:`json.loads`, with
|
Takes the same arguments as the built-in :func:`json.loads`, with
|
||||||
some defaults from application configuration.
|
some defaults from application configuration.
|
||||||
|
|
||||||
:param s: JSON string to deserialize.
|
:param s: String, bytes or bytearray instance to deserialize.
|
||||||
:param app: Use this app's config instead of the active app context
|
:param app: Use this app's config instead of the active app context
|
||||||
or defaults.
|
or defaults.
|
||||||
:param kwargs: Extra arguments passed to :func:`json.loads`.
|
:param kwargs: Extra arguments passed to :func:`json.loads`.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue