{"id":24553257,"url":"https://github.com/wader/json5.jq","last_synced_at":"2025-04-22T22:17:04.978Z","repository":{"id":265806379,"uuid":"860479940","full_name":"wader/json5.jq","owner":"wader","description":"JSON5 implementation for jq","archived":false,"fork":false,"pushed_at":"2025-01-28T11:06:23.000Z","size":15,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T22:16:56.738Z","etag":null,"topics":["jq","json","json5"],"latest_commit_sha":null,"homepage":"","language":"jq","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wader.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-09-20T14:09:19.000Z","updated_at":"2025-04-18T14:30:17.000Z","dependencies_parsed_at":"2024-12-01T02:29:21.141Z","dependency_job_id":"053a3b20-e8fc-4969-8963-b65e437aa844","html_url":"https://github.com/wader/json5.jq","commit_stats":null,"previous_names":["wader/json5.jq"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wader%2Fjson5.jq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wader%2Fjson5.jq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wader%2Fjson5.jq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wader%2Fjson5.jq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wader","download_url":"https://codeload.github.com/wader/json5.jq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250331819,"owners_count":21413103,"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":["jq","json","json5"],"created_at":"2025-01-23T01:37:10.180Z","updated_at":"2025-04-22T22:17:04.968Z","avatar_url":"https://github.com/wader.png","language":"jq","funding_links":[],"categories":[],"sub_categories":[],"readme":"# json5.jq\n\n[JSON5](https://json5.org) implementation for [jq](https://jqlang.github.io/jq/)\n\n\u003e [!WARNING]  \n\u003e This is mostly an experiment at the moment. Performance is probably horrible and error handling non-existing.\n\nCode it mostly a stripped down and modified versionf of [jqjq](https://github.com/wader/jqjq).\n\n## Usage\n```\n$ cat example.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```sh\n# -Rs to read content of example.json5 as a string, don't parse it as JSON\n# -L . adds current directory to library path (where json5.jq is)\n# include \"json5\" to load json5.jq\n# fromjson5 to use included function on input string\n$ jq -Rs -L . 'include \"json5\"; fromjson5' example.json5\n{\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\": 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$ jq -Rs -L . 'include \"json5\"; fromjson5 | .hexadecimal + .positiveSign' example.json5\n912560\n```\nPut content of `json5.jq` in `~/.jq` to make it be included automatically and you can do\n```sh\n$ jq -Rs fromjson5.a \u003c\u003c\u003c '{a:0x123}'\n291\n```\n\n## Run tests\n\n```sh\nmake test\n```\n\n## TODO\n- Cleanup jqjq remains\n- Line/column on error\n- Less hacky `{NaN: 123}` support\n- Verify supported whitespace. Now uses `\\s` regexp\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwader%2Fjson5.jq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwader%2Fjson5.jq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwader%2Fjson5.jq/lists"}