Define a jsonable type using mypy / PEP-526
Long story short, you have the following options: If you have zero idea how your JSON is structured and must support arbitrary JSON blobs, you can: Wait for mypy to support recursive types. If you can’t wait, just use object or Dict[str, object]. It ends up being nearly identical to using recursive types in practice. … Read more