{"id":13576940,"url":"https://github.com/iw4p/partialjson","last_synced_at":"2025-04-05T09:30:33.917Z","repository":{"id":209005311,"uuid":"723012782","full_name":"iw4p/partialjson","owner":"iw4p","description":"Repair invalid LLM JSON, commonly used to parse the output of LLMs — Parsing ChatGPT and llm JSON stream response — Partial and incomplete JSON parser python library for OpenAI | repair invalid JSON, parse output of LLMs","archived":false,"fork":false,"pushed_at":"2025-01-24T12:53:39.000Z","size":862,"stargazers_count":77,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T09:24:01.267Z","etag":null,"topics":["incompletejson","jsonparser","llm","llmjson","openai","parser","partialjson","repair","stream-json","streaming-json"],"latest_commit_sha":null,"homepage":"","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/iw4p.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":"2023-11-24T13:22:48.000Z","updated_at":"2025-03-17T19:47:19.000Z","dependencies_parsed_at":"2024-01-16T20:28:24.982Z","dependency_job_id":"cf22584a-479b-41c7-beb6-f0f56bda233f","html_url":"https://github.com/iw4p/partialjson","commit_stats":null,"previous_names":["iw4p/partialjson"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iw4p%2Fpartialjson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iw4p%2Fpartialjson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iw4p%2Fpartialjson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iw4p%2Fpartialjson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iw4p","download_url":"https://codeload.github.com/iw4p/partialjson/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247317887,"owners_count":20919444,"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","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":["incompletejson","jsonparser","llm","llmjson","openai","parser","partialjson","repair","stream-json","streaming-json"],"created_at":"2024-08-01T15:01:16.072Z","updated_at":"2025-04-05T09:30:33.907Z","avatar_url":"https://github.com/iw4p.png","language":"Python","readme":"# PartialJson\n\n[![Partialjson](https://github.com/iw4p/partialjson/raw/main/images/partialjson.png)](https://pypi.org/project/partialjson/)\n\n## Parse Partial and incomplete JSON in python\n\n![](https://github.com/iw4p/partialjson/raw/main/images/partialjson.gif)\n\n### Parse Partial and incomplete JSON in python with just 3 lines of python code.\n\n[![PyPI version](https://img.shields.io/pypi/v/partialjson.svg)](https://pypi.org/project/partialjson)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/partialjson.svg)](#Installation)\n[![Downloads](https://pepy.tech/badge/partialjson)](https://pepy.tech/project/partialjson)\n\n## Example\n\n```python\nfrom partialjson.json_parser import JSONParser\nparser = JSONParser()\n\nincomplete_json = '{\"name\": \"John Doe\", \"age\": 30, \"is_student\": false, \"courses\": [\"Math\", \"Science\"'\nprint(parser.parse(incomplete_json))\n# {'name': 'John', 'age': 30, 'is_student': False, 'courses': ['Math', 'Science']}\n```\n\nProblem with `\\n`? strict mode is here\n\n```python\nfrom partialjson.json_parser import JSONParser\nparser = JSONParser(strict=False)\n\nincomplete_json = '{\"name\": \"John\\nDoe\", \"age\": 30, \"is_student\": false, \"courses\": [\"Math\", \"Science\"'\nprint(parser.parse(incomplete_json))\n# {'name': 'John\\nDoe', 'age': 30, 'is_student': False, 'courses': ['Math', 'Science']}\n```\n\n### Installation\n\n```sh\n$ pip install partialjson\n```\n\nAlso can be found on [pypi](https://pypi.org/project/partialjson/)\n\n### How can I use it?\n\n- Install the package by pip package manager.\n- After installing, you can use it and call the library.\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=iw4p/partialjson\u0026type=Date)](https://star-history.com/#iw4p/partialjson\u0026Date)\n\n### Issues\n\nFeel free to submit issues and enhancement requests or contact me via [vida.page/nima](https://vida.page/nima).\n\n### Contributing\n\nPlease refer to each project's style and contribution guidelines for submitting patches and additions. In general, we follow the \"fork-and-pull\" Git workflow.\n\n1.  **Fork** the repo on GitHub\n2.  **Clone** the project to your own machine\n3.  **Update the Version** inside **init**.py\n4.  **Commit** changes to your own branch\n5.  **Push** your work back up to your fork\n6.  Submit a **Pull request** so that we can review your changes\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiw4p%2Fpartialjson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiw4p%2Fpartialjson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiw4p%2Fpartialjson/lists"}