Closed as not planned
Description
As this is an issue that pops up quite often and would be useful in a few places in typeshed as well: Should we add json types to _typeshed
? As recursive types aren't possible at the moment, I'd suggest something simple like this:
JsonObject = dict[str, Any] # Any is Json
JsonArray = list[Any] # Any is Json
Json = JsonObject | JsonArray | str | float | int | bool | None
This can be improved if recursive types become available and could be a useful placeholder if/when the stdlib gains a proper JSON type.
Metadata
Metadata
Assignees
Labels
No labels