{"id":16352706,"url":"https://github.com/kevinheavey/jsonalias","last_synced_at":"2025-07-29T22:35:24.250Z","repository":{"id":109012135,"uuid":"559035163","full_name":"kevinheavey/jsonalias","owner":"kevinheavey","description":"A microlibrary that defines a Json type alias for Python","archived":false,"fork":false,"pushed_at":"2025-01-14T14:42:34.000Z","size":11,"stargazers_count":20,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-28T06:26:40.537Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevinheavey.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-28T21:58:46.000Z","updated_at":"2025-06-05T15:41:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"b5038ff9-b48a-4b06-8d2a-4c7cb85dcd5e","html_url":"https://github.com/kevinheavey/jsonalias","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kevinheavey/jsonalias","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinheavey%2Fjsonalias","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinheavey%2Fjsonalias/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinheavey%2Fjsonalias/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinheavey%2Fjsonalias/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevinheavey","download_url":"https://codeload.github.com/kevinheavey/jsonalias/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinheavey%2Fjsonalias/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267772489,"owners_count":24142089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T01:27:15.996Z","updated_at":"2025-07-29T22:35:24.196Z","avatar_url":"https://github.com/kevinheavey.png","language":"Python","readme":"# jsonalias\n\nA microlibrary that defines a `Json` type alias for Python.\n\n## This README is longer than the library\n\nSeriously, this is all the code:\n\n```python\nfrom typing import Dict, List, Union\n\nJson = Union[Dict[str, \"Json\"], List[\"Json\"], str, int, float, bool, None]\n```\n\nIf we only supported Python \u003e= 3.10, it would fit on one line:\n\n```python\nJson = dict[str, 'Json'] | list['Json'] | str | int | float | bool | None\n```\n\n## Then why make a library out of it?\n\nI want to use this type alias in multiple projects and it's\njust about long enough to be annoying.\n\nThis alias should probably get added to the Python `typing` module.\nIf it does and I haven't put a big notice on this README,\nplease open a PR.\n\n## Example\n\n```python\nfrom jsonalias import Json\n\nd: Json = {\"foo\": [\"bar\", {\"x\": \"y\"}]}\n```\n\n## It's not working please help???\n\nMake sure you're using mypy \u003e= 0.981 and running with the\n`--enable-recursive-aliases` flag.\n\n## Special Thanks\n\nGitHub user wbolster for [this comment](https://github.com/python/typing/issues/182#issuecomment-1259412066)\nnotifying us that mypy could now do JSON.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinheavey%2Fjsonalias","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinheavey%2Fjsonalias","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinheavey%2Fjsonalias/lists"}