Created
February 5, 2024 20:16
-
-
Save jhenly/3c84f1fc477b36b7fd5c53a61fd08d90 to your computer and use it in GitHub Desktop.
A few handy JSON types.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ Includes a few handy JSON types. | |
| ``` | |
| JsonPrimitive = str | int | float | bool | None | |
| Json = JsonPrimitive | dict[str, 'Json'] | list['Json'] | |
| JsonObject = dict[str, Json] | |
| JsonArray = list[Json] | |
| ``` | |
| """ | |
| __all__ = ( | |
| 'Json', | |
| 'JsonArray', | |
| 'JsonObject', | |
| 'JsonPrimitive', | |
| ) | |
| JsonPrimitive = str | int | float | bool | None | |
| Json = JsonPrimitive | dict[str, 'Json'] | list['Json'] | |
| JsonObject = dict[str, Json] | |
| JsonArray = list[Json] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment