{"id":24227534,"url":"https://github.com/qvecs/qjson5","last_synced_at":"2026-05-01T22:35:12.501Z","repository":{"id":272075601,"uuid":"915464970","full_name":"qvecs/qjson5","owner":"qvecs","description":"📎 A quick JSON5 implementation written in C, with Python bindings.","archived":false,"fork":false,"pushed_at":"2025-05-18T22:03:56.000Z","size":39,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-05T16:13:10.240Z","etag":null,"topics":["c","json5","python"],"latest_commit_sha":null,"homepage":"","language":"C","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/qvecs.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2025-01-11T22:56:39.000Z","updated_at":"2025-10-09T22:12:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"056017c4-7272-4411-a7af-2bc7f2dc2b23","html_url":"https://github.com/qvecs/qjson5","commit_stats":null,"previous_names":["qvecs/qjson5"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/qvecs/qjson5","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qvecs%2Fqjson5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qvecs%2Fqjson5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qvecs%2Fqjson5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qvecs%2Fqjson5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qvecs","download_url":"https://codeload.github.com/qvecs/qjson5/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qvecs%2Fqjson5/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32515838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["c","json5","python"],"created_at":"2025-01-14T10:18:09.319Z","updated_at":"2026-05-01T22:35:12.493Z","avatar_url":"https://github.com/qvecs.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📎 Quick JSON5 _(qjson5)_\n\n\u003cp align=\"center\"\u003e\n\n  \u003ca href=\"https://github.com/qvecs/qjson5/actions?query=workflow%3ABuild\"\u003e\n    \u003cimg src=\"https://github.com/qvecs/qjson5/workflows/Build/badge.svg\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nA quick [JSON5](https://json5.org/) implementation written in C, with Python bindings.\n\n## Install\n\n```\npip install qjson5\n```\n\n## Usage\n\n```python\nimport qjson5\n\ndata = {\n    \"key\": \"value\",\n    \"array\": [1, 2, 3],\n    \"object\": {\n        \"nested\": \"value\"\n    }\n}\n\nencoded = qjson5.dumps(data)\nprint(f\"Encoded: {encoded}\")\n\ndecoded = qjson5.loads(encoded)\nprint(f\"Decoded: {decoded}\")\n```\n\n### Complex Usage\n\n```json5\n{\n  // comments\n  unquoted: 'and you can quote me on that',\n  singleQuotes: 'I can use \"double quotes\" here',\n  lineBreaks: \"Look, Mom! \\\nNo \\\\n's!\",\n  hexadecimal: 0xdecaf,\n  leadingDecimalPoint: .8675309, andTrailing: 8675309.,\n  positiveSign: +1,\n  trailingComma: 'in objects', andIn: ['arrays',],\n  \"backwardsCompatible\": \"with JSON\",\n}\n```\n\n```python\nimport qjson5\n\nwith open(\"in.json5\") as f_in:\n    with open(\"out.json\", \"w\") as f_out:\n        qjson5.dump(qjson5.load(f_in), f_out, indent=4)\n```\n\n```json\n{\n    \"unquoted\": \"and you can quote me on that\",\n    \"singleQuotes\": \"I can use \\\"double quotes\\\" here\",\n    \"lineBreaks\": \"Look, Mom! No \\\\n's!\",\n    \"hexadecimal\": 912559,\n    \"leadingDecimalPoint\": 0.8675309,\n    \"andTrailing\": 8675309,\n    \"positiveSign\": 1,\n    \"trailingComma\": \"in objects\",\n    \"andIn\": [\n        \"arrays\"\n    ],\n    \"backwardsCompatible\": \"with JSON\"\n}\n```\n\n## Benchmark\n\nComparing with the other JSON5 libraries:\n\n* [pyjson5](https://pypi.org/project/pyjson5/)\n* [json5](https://pypi.org/project/json5/)\n\nNon-JSON5 library:\n\n* [json](https://docs.python.org/3/library/json.html) (built-in)\n\n```bash\n==== JSON Libraries Dump+Load Benchmark ====\n\n--- Data Set: SMALL (10 keys per level, 2 levels) ---\njson5        =\u003e avg: 5274.9761 ms (std: 74.0018 ms) over 1000 iterations\nbuiltin-json =\u003e avg: 14.1933 ms (std: 0.5063 ms) over 1000 iterations\npyjson5      =\u003e avg: 11.7564 ms (std: 0.1826 ms) over 1000 iterations\nqjson5       =\u003e avg: 8.4363 ms (std: 0.0669 ms) over 1000 iterations\n\n--- Data Set: MEDIUM (100 keys per level, 10 levels) ---\njson5        =\u003e Skipped\nbuiltin-json =\u003e avg: 150.4009 ms (std: 1.8448 ms) over 500 iterations\npyjson5      =\u003e avg: 147.5031 ms (std: 0.8454 ms) over 500 iterations\nqjson5       =\u003e avg: 98.7803 ms (std: 0.3422 ms) over 500 iterations\n\n--- Data Set: LARGE (1000 keys per level, 50 levels) ---\njson5        =\u003e Skipped\nbuiltin-json =\u003e avg: 150.6014 ms (std: 3.4461 ms) over 10 iterations\npyjson5      =\u003e Error: Maximum nesting level exceeded near 4642\nqjson5       =\u003e avg: 99.5796 ms (std: 0.9641 ms) over 10 iterations\n```\n\nSee `scripts/benchmark.py` for benchmarking details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqvecs%2Fqjson5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqvecs%2Fqjson5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqvecs%2Fqjson5/lists"}