{"id":32160149,"url":"https://github.com/moleike/haskell-jsonnet","last_synced_at":"2026-02-20T00:31:40.225Z","repository":{"id":40453754,"uuid":"299531577","full_name":"moleike/haskell-jsonnet","owner":"moleike","description":"🎏 Haskell implementation of Jsonnet","archived":false,"fork":false,"pushed_at":"2026-01-01T01:46:34.000Z","size":465,"stargazers_count":24,"open_issues_count":12,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-05T16:52:51.268Z","etag":null,"topics":["compiler","configuration-language","haskell","infrastructure-as-code","jsonnet"],"latest_commit_sha":null,"homepage":"https://hackage.haskell.org/package/jsonnet","language":"Jsonnet","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/moleike.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"ko_fi":"moleike"}},"created_at":"2020-09-29T07:00:00.000Z","updated_at":"2025-08-21T08:58:35.000Z","dependencies_parsed_at":"2025-02-17T13:23:10.645Z","dependency_job_id":"b06f8e91-36d7-4cab-8746-e2fb42f17e62","html_url":"https://github.com/moleike/haskell-jsonnet","commit_stats":{"total_commits":185,"total_committers":5,"mean_commits":37.0,"dds":"0.11351351351351346","last_synced_commit":"1cab72fd7cbdebfdb1afcc3a04bed411990bc700"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/moleike/haskell-jsonnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moleike%2Fhaskell-jsonnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moleike%2Fhaskell-jsonnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moleike%2Fhaskell-jsonnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moleike%2Fhaskell-jsonnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moleike","download_url":"https://codeload.github.com/moleike/haskell-jsonnet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moleike%2Fhaskell-jsonnet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29637408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T22:32:43.237Z","status":"ssl_error","status_checked_at":"2026-02-19T22:32:38.330Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["compiler","configuration-language","haskell","infrastructure-as-code","jsonnet"],"created_at":"2025-10-21T13:36:18.844Z","updated_at":"2026-02-20T00:31:40.219Z","avatar_url":"https://github.com/moleike.png","language":"Jsonnet","funding_links":["https://ko-fi.com/moleike"],"categories":[],"sub_categories":[],"readme":"# haskell-jsonnet\n\n[![Actions Status](https://github.com/moleike/haskell-jsonnet/workflows/build/badge.svg)](https://github.com/moleike/haskell-jsonnet/actions)\n[![Hackage](https://img.shields.io/hackage/v/jsonnet.svg?logo=haskell)](https://hackage.haskell.org/package/jsonnet)\n\nA full-fledged Haskell implementation of the [Jsonnet][jsonnet] spec.\nFor an introduction to the language itself, see the [tutorial][tutorial] or language [reference][reference].\nWe are using the same test suite used in the offical [C++][cpp-jsonnet] and [Go][go-jsonnet] implementation (which is fairly comprehensive).\n\n## Progress\n\nHere is the implementation status of the main language features:\n\n- [X] array and object comprehension\n- [X] array slices\n- [X] Python-style string formatting\n- [X] text blocks\n- [X] verbatim strings\n- [X] computed field names\n- [X] object-level locals\n- [X] object-level asserts (by Berk Özkütük)\n- [X] keyword parameters\n- [X] default arguments\n- [ ] top-level arguments (https://github.com/moleike/haskell-jsonnet/issues/24)\n- [X] external variables (by Berk Özkütük)\n- [X] hidden fields (by Cristhian Motoche)\n- [X] tailstrict annotation\n- [X] outermost object reference `$`\n- [X] mixin inheritence and open recursion (operator `+` with `self` and `super`)\n- [X] field composition (operator `+:`)\n- [X] multiple file output (by Berk Özkütük)\n- [X] verbatim imports (by Berk Özkütük)\n\n## Build\n\nUsing the [stack][stack] build tool:\n\n```console\n% git clone github.com/moleike/haskell-jsonnet.git\n% cd haskell-jsonnet\n% stack build\n```\n\n## Install\n\n```console\n% stack install # to install\n```\n\n## Usage\n\n```console\n% hs-jsonnet --help\nUsage: hs-jsonnet [-v|--version] [-e|--exec] [\u003cfilename\u003e]\n                  [(-o|--output-file \u003cfilename\u003e) | (-m|--multi \u003cdir\u003e)]\n                  [--compact] [-S|--string] [-V|--ext-str VAR=VALUE]\n                  [--ext-str-file FILE] [--ext-code VAR=EXPR]\n                  [--ext-code-file FILE]\n\nAvailable options:\n  -v,--version             Print version of the program\n  -h,--help                Show this help text\n  -e,--exec                Treat filename as code\n  \u003cfilename\u003e               Jsonnet source file or stdin\n  -o,--output-file \u003cfilename\u003e\n                           Write to the output file rather than stdout\n  -m,--multi \u003cdir\u003e         Write multiple files to the directory, list files on\n                           stdout\n  --compact                Produce a compact JSON output\n  -S,--string              Expect a string, manifest as plain text\n  -V,--ext-str VAR=VALUE   External string variable\n  --ext-str-file FILE      External string variable as file\n  --ext-code VAR=EXPR      External code variable\n  --ext-code-file FILE     External code variable as file\n```\n\n## Output formats\n\nBy default Jsonnet programs evaluate to a JSON document, serialized using `aeson`. \n\nThe `std` library provides several methods to output other formats, e.g. \nto generate a Yaml stream instead:\n\n``` console\n% hs-jsonnet -S -e \"std.manifestYamlStream(['a', 1, []])\"\n---\n\"a\"\n---\n1\n---\n[]\n...\n```\n\nNote the we need to use the option `-S` to output a verbatim string, instead of default JSON.\n\nSimilarly, to output prettified JSON: \n\n``` console\n% cat pretty.jsonnet \nstd.manifestJsonEx(\n{\n    x: [1, 2, 3, true, false, null,\n        \"string\\nstring\"],\n    y: { a: 1, b: 2, c: [1, 2] },\n}, \"    \")\n\n% hs-jsonnet -S pretty.jsonnet\n{\n    \"x\": [\n        1,\n        2,\n        3,\n        true,\n        false,\n        null,\n        \"string\\nstring\"\n    ],\n    \"y\": {\n        \"a\": 1,\n        \"b\": 2,\n        \"c\": [\n            1,\n            2\n        ]\n    }\n}\n```\n\nSee the Standard library [documentation][stdlib] for more details.\n\n\n[//]: # \"Implementation overview\"\n\n## Benchmarks\n\nPreliminary [results][benchmark-gist] using the benchmarks [here][cpp-benchmarks] \nfor comparison.\n\n## Contributing\n\nSee [CONTRIBUTING.md][contributing].\n\n## Acknowledgments\n\nI took inspiration from [Expresso][Expresso], [hnix][hnix], [fixplate][fixplate], [Disco][disco], \nand numerous other libraries. Thanks to their authors.\n\n## License\n\nSee [LICENSE][license].\n\nCopyright © 2020–present Alexandre Moreno\n\n[jsonnet]: https://jsonnet.org/\n[tutorial]: https://jsonnet.org/learning/tutorial.html\n[reference]: https://jsonnet.org/ref/language.html\n[stack]: https://docs.haskellstack.org/en/stable/README\n[Expresso]: https://github.com/willtim/Expresso\n[hnix]: https://github.com/haskell-nix/hnix\n[fixplate]: https://hackage.haskell.org/package/fixplate\n[disco]: https://github.com/disco-lang/disco\n[contributing]: https://github.com/moleike/haskell-jsonnet/blob/master/CONTRIBUTING.md\n[license]: https://github.com/moleike/haskell-jsonnet/blob/master/LICENSE\n[cpp-jsonnet]: https://github.com/google/jsonnet\n[cpp-benchmarks]: https://github.com/google/jsonnet/tree/master/benchmarks\n[go-jsonnet]: https://github.com/google/go-jsonnet\n[benchmark-gist]: https://gist.github.com/moleike/17d5de15be06b05ddad317fe1fcf95a5\n[stdlib]: https://jsonnet.org/ref/stdlib.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoleike%2Fhaskell-jsonnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoleike%2Fhaskell-jsonnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoleike%2Fhaskell-jsonnet/lists"}