{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/hcl/issues/24","labels_url":"https://api.github.com/repos/hashicorp/hcl/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/hcl/issues/24/comments","events_url":"https://api.github.com/repos/hashicorp/hcl/issues/24/events","html_url":"https://github.com/hashicorp/hcl/pull/24","id":52284960,"number":24,"title":"add PoC cmd converting HCL to JSON","user":{"login":"josephholsten","id":7495,"avatar_url":"https://avatars.githubusercontent.com/u/7495?v=3","gravatar_id":"","url":"https://api.github.com/users/josephholsten","html_url":"https://github.com/josephholsten","followers_url":"https://api.github.com/users/josephholsten/followers","following_url":"https://api.github.com/users/josephholsten/following{/other_user}","gists_url":"https://api.github.com/users/josephholsten/gists{/gist_id}","starred_url":"https://api.github.com/users/josephholsten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josephholsten/subscriptions","organizations_url":"https://api.github.com/users/josephholsten/orgs","repos_url":"https://api.github.com/users/josephholsten/repos","events_url":"https://api.github.com/users/josephholsten/events{/privacy}","received_events_url":"https://api.github.com/users/josephholsten/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2014-12-17T20:05:41Z","updated_at":"2015-02-11T16:16:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hashicorp/hcl/pulls/24","html_url":"https://github.com/hashicorp/hcl/pull/24","diff_url":"https://github.com/hashicorp/hcl/pull/24.diff","patch_url":"https://github.com/hashicorp/hcl/pull/24.patch"},"body":"This adds an `hcl2json` command which reads HCL from STDIN and writes indented JSON to STDOUT.\r\n\r\nAt the moment it is not friendly at all, and probably is only useful for people who are testing HCL code changes. Before merging, it should be a friendly tool to allow people who :heart: HCL to use it in environments where importing this package is unwieldy.\r\n\r\nSome things it should probably do:\r\n- [x] `hcl2json`, `hcl2json -h` should print usage\r\n- [x] `hcl2json foo.hcl` should read from `foo.hcl`\r\n- [x] `hcl2json -` should read from STDIN\r\n- [x] refactor to extract a CLI struct for testing\r\n- [x] add tests for the above functionality\r\n- build through gox?\r\n"},"comment":{"url":"https://api.github.com/repos/hashicorp/hcl/issues/comments/73909441","html_url":"https://github.com/hashicorp/hcl/pull/24#issuecomment-73909441","issue_url":"https://api.github.com/repos/hashicorp/hcl/issues/24","id":73909441,"user":{"login":"solarce","id":9660,"avatar_url":"https://avatars.githubusercontent.com/u/9660?v=3","gravatar_id":"","url":"https://api.github.com/users/solarce","html_url":"https://github.com/solarce","followers_url":"https://api.github.com/users/solarce/followers","following_url":"https://api.github.com/users/solarce/following{/other_user}","gists_url":"https://api.github.com/users/solarce/gists{/gist_id}","starred_url":"https://api.github.com/users/solarce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solarce/subscriptions","organizations_url":"https://api.github.com/users/solarce/orgs","repos_url":"https://api.github.com/users/solarce/repos","events_url":"https://api.github.com/users/solarce/events{/privacy}","received_events_url":"https://api.github.com/users/solarce/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T16:16:26Z","updated_at":"2015-02-11T16:16:26Z","body":"Just wanted to add my two ¢ here that it would be great to see this merged and also have the ambiguity around handling of multiple keys with the same name cleared up, e.g. https://github.com/virtuald/pyhcl/issues/1, as this is going to be the common case for any complex Terraform configuration files.\r\n\r\nAll it takes is two `aws_security_group` or `aws_instance` resource definitions in the same configuration file and you've got this \"issue\", as right now pyhcl's implementation will collapse them.\r\n\r\nSee https://gist.github.com/solarce/39d634fe5f6b3ae494c6 for a quick example "}}