{"id":18644752,"url":"https://github.com/hjson/hjson-py","last_synced_at":"2025-04-08T16:07:29.390Z","repository":{"id":25389120,"uuid":"28817644","full_name":"hjson/hjson-py","owner":"hjson","description":"Hjson for Python","archived":false,"fork":false,"pushed_at":"2022-08-13T02:43:16.000Z","size":1191,"stargazers_count":214,"open_issues_count":9,"forks_count":19,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-01T15:11:55.724Z","etag":null,"topics":["hjson","python"],"latest_commit_sha":null,"homepage":"https://hjson.github.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hjson.png","metadata":{"files":{"readme":"README.md","changelog":"history.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-05T15:12:08.000Z","updated_at":"2025-03-22T00:16:05.000Z","dependencies_parsed_at":"2022-08-07T13:00:06.619Z","dependency_job_id":null,"html_url":"https://github.com/hjson/hjson-py","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hjson%2Fhjson-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hjson%2Fhjson-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hjson%2Fhjson-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hjson%2Fhjson-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hjson","download_url":"https://codeload.github.com/hjson/hjson-py/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247878022,"owners_count":21011158,"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":["hjson","python"],"created_at":"2024-11-07T06:13:31.060Z","updated_at":"2025-04-08T16:07:29.366Z","avatar_url":"https://github.com/hjson.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# hjson-py\n\n[![Build Status](https://img.shields.io/travis/hjson/hjson-py.svg?style=flat-square)](http://travis-ci.org/hjson/hjson-py)\n[![PyPI version](https://img.shields.io/pypi/v/hjson.svg?style=flat-square)](https://pypi.python.org/pypi/hjson)\n\n[Hjson](https://hjson.github.io), a user interface for JSON\n\n![Hjson Intro](https://hjson.github.io/hjson1.gif)\n\nHjson works with Python 2.5+ and Python 3.3+\n\nThe Python implementation of Hjson is based on [simplejson](https://github.com/simplejson/simplejson). For other platforms see [hjson.github.io](https://hjson.github.io).\n\n# Installation\n\n- `pip install hjson`\n\n- or download from https://pypi.python.org/pypi/hjson\n\npip will also add the `hjson` tool to your `PATH` (try `echo '{a:1}'|hjson`).\n\n## Commandline\n\n```\nUsage:\n  hjson [options]\n  hjson [options] \u003cinput\u003e\n  hjson (-h | --help)\n  hjson (-V | --version)\n\nOptions:\n  -h --help     Show this screen.\n  -j            Output as formatted JSON.\n  -c            Output as JSON.\n  -V --version  Show version.\n```\n\nE.g. `echo '{\"json\":\"obj\"}' | hjson`\n\n# Usage\n\n```python\nimport hjson\n```\n\n## Decoding Hjson\n\n```python\ntext = \"\"\"{\n  foo: a\n  bar: 1\n}\"\"\"\n\nhjson.loads(text)\n```\n\nResult:\n```python\nOrderedDict([('foo', 'a'), ('bar', 1)])\n```\n\n## Encoding Python object hierarchies\n\n```python\nhjson.dumps({'foo': 'text', 'bar': (1, 2)})\n```\n\nResult:\n```\n{\n  foo: text\n  bar:\n  [\n    1\n    2\n  ]\n}\n```\n\n## Encoding as JSON\n\nNote that this is probably not as performant as the simplejson version.\n\n```python\nhjson.dumpsJSON(['foo', {'bar': ('baz', None, 1.0, 2)}])\n```\n\nResult:\n`'[\"foo\", {\"bar\": [\"baz\", null, 1.0, 2]}]'`\n\n\n\n# API\n\n[hjson-py documentation](http://hjson.github.io/hjson-py/)\n\n# History\n\n[see history.md](history.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhjson%2Fhjson-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhjson%2Fhjson-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhjson%2Fhjson-py/lists"}