{"id":37202697,"url":"https://github.com/movableink/json2hcl","last_synced_at":"2026-01-14T23:22:41.045Z","repository":{"id":57617689,"uuid":"199023621","full_name":"movableink/json2hcl","owner":"movableink","description":"Convert JSON to HCL, and vice versa. We don't use json2hcl anymore ourselves, so we can't invest time into it. However, we're still welcoing PRs.","archived":false,"fork":true,"pushed_at":"2019-07-26T13:56:24.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T14:19:53.793Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/kvz/json2hcl","language":"HCL","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"kvz/json2hcl","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/movableink.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}},"created_at":"2019-07-26T13:42:38.000Z","updated_at":"2019-07-26T13:55:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/movableink/json2hcl","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/movableink/json2hcl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movableink%2Fjson2hcl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movableink%2Fjson2hcl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movableink%2Fjson2hcl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movableink%2Fjson2hcl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/movableink","download_url":"https://codeload.github.com/movableink/json2hcl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movableink%2Fjson2hcl/sbom","scorecard":{"id":661645,"data":{"date":"2025-08-11","repo":{"name":"github.com/movableink/json2hcl","commit":"c1c3f591b00c79d5c6c1701c3f3c92472a606d6d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T16:23:26.620Z","repository_id":57617689,"created_at":"2025-08-21T16:23:26.620Z","updated_at":"2025-08-21T16:23:26.620Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28437981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: 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":[],"created_at":"2026-01-14T23:22:38.821Z","updated_at":"2026-01-14T23:22:40.936Z","avatar_url":"https://github.com/movableink.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/kvz/json2hcl.svg?branch=master)](https://travis-ci.org/kvz/json2hcl)\n\n# json2hcl (and hcl2json)\n\nConvert JSON to HCL and HCL to JSON via STDIN / STDOUT.\n\n## Warning\n\nWe don't use json2hcl anymore ourselves, so we can't invest time into it. However, we're still welcoing PRs.\n\n## Install\n\nCheck the [releases](https://github.com/kvz/json2hcl/releases) for the latest version.\nThen it's just a matter of downloading the right one for you platform, and making the binary\nexecutable. \n\n### Linux\n\nHere's how it could look for 64 bits Linux, if you wanted `json2hcl` available globally inside\n`/usr/local/bin`:\n\n```bash\ncurl -SsL https://github.com/kvz/json2hcl/releases/download/v0.0.6/json2hcl_v0.0.6_linux_amd64 \\\n  | sudo tee /usr/local/bin/json2hcl \u003e /dev/null \u0026\u0026 sudo chmod 755 /usr/local/bin/json2hcl \u0026\u0026 json2hcl -version\n```\n\n### OSX\n\nHere's how it could look for 64 bits Darwin, if you wanted `json2hcl` available globally inside\n`/usr/local/bin`:\n\n```bash\ncurl -SsL https://github.com/kvz/json2hcl/releases/download/v0.0.6/json2hcl_v0.0.6_darwin_amd64 \\\n  | sudo tee /usr/local/bin/json2hcl \u003e /dev/null \u0026\u0026 sudo chmod 755 /usr/local/bin/json2hcl \u0026\u0026 json2hcl -version\n```\n\n## Use\n\nHere's an example [`fixtures/infra.tf.json`](fixtures/infra.tf.json) being\nconverted to HCL:\n\n```bash\n$ json2hcl \u003c fixtures/infra.tf.json\n\"output\" \"arn\" {\n  \"value\" = \"${aws_dynamodb_table.basic-dynamodb-table.arn}\"\n}\n... rest of HCL truncated\n```\n\nTypical use would be\n\n```bash\n$ json2hcl \u003c fixtures/infra.tf.json \u003e fixtures/infra.tf\n```\n\n## hcl2json\n\nAs a bonus, the conversation the other way around is also supported via the `-reverse` flag:\n\n```bash\n$ json2hcl -reverse \u003c fixtures/infra.tf\n{\n  \"output\": [\n    {\n      \"arn\": [\n        {\n          \"value\": \"${aws_dynamodb_table.basic-dynamodb-table.arn}\"\n        }\n      ]\n    }, \n  ... rest of JSON truncated\n  ]\n}\n```\n\n## Development\n\n```bash\nmkdir -p ~/go/src/github.com/kvz\ncd ~/go/src/github.com/kvz\ngit clone git@github.com:kvz/json2hcl.git\ncd json2hcl\ngo get\n```\n\n## Why?\n\nIf you don't know HCL, read [Why HCL](https://github.com/hashicorp/hcl#why).\n\nAs for why json2hcl and hcl2json, we're building a tool called Frey that marries multiple underlying\ntools. We'd like configuration previously written in YAML or TOML to now be in HCL now as well. \nIt's easy enough to convert the mentioned formats to JSON, and strictly speaking HCL is already \nable to read JSON natively, so why the extra step?\n\nWe're doing this for readability and maintainability, we wanted to save \nour infra recipes as HCL directly in our repos, instead of only having machine readable intermediate \nJSON that we'd need to hack on. This saves time spotting problems, and makes the experience somewhat \nenjoyable even.\n\nIn the off-chance you too have machine-readable JSON and are interested in converting that\nto the more human-being friendly HCL format, we thought we'd share this.\n\nIt's no rocket science, we're using already available HashiCorp libraries to support the conversion,\nHashiCorp could have easily released their own tools around this, and perhaps they will, but \nso far, they haven't.\n\n## Changelog\n\n### Ideabox (Unplanned)\n\n- [ ] Give the README.md some love\n\n### v0.0.7 (Unreleased)\n\n- [ ] Tests\n\n### v0.0.6 (2016-09-06)\n\n- [x] Deprecate goxc in favor of native builds\n\n### v0.0.5 (2016-09-06)\n\n- [x] Add hcl2json via the `-reverse` flag \n\n### v0.0.4 (2016-09-05)\n\n- [x] Error handling\n- [x] Cross-compiling and shipping releases\n\n## Contributors\n\n- [Marius Kleidl](https://github.com/Acconut)\n- [Kevin van Zonneveld](https://github.com/kvz)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmovableink%2Fjson2hcl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmovableink%2Fjson2hcl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmovableink%2Fjson2hcl/lists"}