{"id":15673990,"url":"https://github.com/sshine/hs-jq","last_synced_at":"2025-07-03T13:35:32.162Z","repository":{"id":66658563,"uuid":"208782099","full_name":"sshine/hs-jq","owner":"sshine","description":":beetle: Implementing jq in Haskell","archived":false,"fork":false,"pushed_at":"2024-11-14T15:15:57.000Z","size":104,"stargazers_count":22,"open_issues_count":7,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T21:31:52.326Z","etag":null,"topics":["haskell","jq","json"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/sshine.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,"zenodo":null}},"created_at":"2019-09-16T11:23:23.000Z","updated_at":"2025-03-13T18:48:03.000Z","dependencies_parsed_at":"2024-11-09T07:00:40.617Z","dependency_job_id":"420bdeb8-7097-4c00-84d2-8d287f2442d7","html_url":"https://github.com/sshine/hs-jq","commit_stats":{"total_commits":91,"total_committers":8,"mean_commits":11.375,"dds":"0.31868131868131866","last_synced_commit":"d800ea1bd7c2e3894daee97ff7bd45e78017bf73"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sshine/hs-jq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshine%2Fhs-jq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshine%2Fhs-jq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshine%2Fhs-jq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshine%2Fhs-jq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sshine","download_url":"https://codeload.github.com/sshine/hs-jq/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshine%2Fhs-jq/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263335808,"owners_count":23450934,"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":["haskell","jq","json"],"created_at":"2024-10-03T15:43:21.027Z","updated_at":"2025-07-03T13:35:32.117Z","avatar_url":"https://github.com/sshine.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hs-jq\n\n[jq][1] is a command-line JSON processor. It is also a domain-specific\ncombinator language, which makes it easy to analyse and optimize. This\nproject aims to reimplement jq in Haskell, mostly because it's fun.\n\n## Check it out\n\nThere is currently no executable. To see the tests that pass you can:\n\n```\n$ git clone https://github.com/sshine/hs-jq.git\n$ cd hs-jq\n$ stack test\n```\n\nYou can also experiment with the parser manually using GHCi:\n\n```\n$ stack ghci\n\u003e parseExpr \"def map(f): [ .[] | f ]; map(.foo)\"\nRight (FuncDef \"map\" [FilterParam \"f\"]\n        (List [Pipe (ValueIterator Identity) (FilterCall \"f\" Nothing)])\n        (FilterCall \"map\" (Just [DotField \"foo\"])))\n```\n\n## Why?\n\n - I think jq is a really cool domain-specific language, but I'm really bad\n   at it.\n\n   Maybe if I write an interpreter for it, I will become better at it.\n - This implementation will\n    - confirm that the original jq implementation works as intended.\n    - document the original jq syntax [as documented][8] in [JBOL][7].\n    - prototype improvements to jq, such as syntax-preserving arithmetic,\n      arbitrary-size numbers, fusion of combinators, and linting.\n - Writing property-based tests in Haskell is a lot more convenient than\n   doing so in C. This will give me an opportunity to experiment with\n   [Hedgehog][2].\n - It would be really cool if you could transform [Aeson][3] `Value`s using a\n   [quasi-quoter][4]. This would give me a chance to explore how quasi-quoters\n   work in Haskell.\n\n   ```haskell\n   slugs :: Value -\u003e Either JqError Value\n   slugs = [jq| .exercises | map(.slug) |]\n   ```\n\n## Comparable projects\n\n - [`stedolan/jq`][1]: \"Command-line JSON processor\"\n - [`chrisdone/jl`][5]: \"Functional sed for JSON\"\n - [`haskell-works/hw-jq`][6]: From 2017, appears very similar to this project.\n\n## Status\n\nParser: 72 out of 653 tests failed.\n\n## Contributing\n\nIf you like this project, or if you're looking for an opportunity to practice\nwriting open source Haskell, feel free to open an issue or a PR, or send me an\nemail. A good starting point could be to look through issues labelled \"[help\nwanted][9]\".\n\nIn connection to Hacktoberfest 2019 I received 9 PRs. Thanks a bunch, guys!\n\n[1]: https://github.com/stedolan/jq\n[2]: http://hackage.haskell.org/package/hedgehog\n[3]: http://hackage.haskell.org/package/aeson\n[4]: https://wiki.haskell.org/Quasiquotation\n[5]: https://github.com/chrisdone/jl\n[6]: https://github.com/haskell-works/hw-jq\n[7]: https://github.com/fadado/JBOL\n[8]: https://github.com/fadado/JBOL/blob/master/doc/JQ-language-grammar.md\n[9]: https://github.com/sshine/hs-jq/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshine%2Fhs-jq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsshine%2Fhs-jq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshine%2Fhs-jq/lists"}