{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/hcl/issues/158","repository_url":"https://api.github.com/repos/hashicorp/hcl","labels_url":"https://api.github.com/repos/hashicorp/hcl/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/hcl/issues/158/comments","events_url":"https://api.github.com/repos/hashicorp/hcl/issues/158/events","html_url":"https://github.com/hashicorp/hcl/issues/158","id":183479434,"number":158,"title":"Inconsistent parse errors on empty map element","user":{"login":"brianshumate","id":77563,"avatar_url":"https://avatars.githubusercontent.com/u/77563?v=3","gravatar_id":"","url":"https://api.github.com/users/brianshumate","html_url":"https://github.com/brianshumate","followers_url":"https://api.github.com/users/brianshumate/followers","following_url":"https://api.github.com/users/brianshumate/following{/other_user}","gists_url":"https://api.github.com/users/brianshumate/gists{/gist_id}","starred_url":"https://api.github.com/users/brianshumate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianshumate/subscriptions","organizations_url":"https://api.github.com/users/brianshumate/orgs","repos_url":"https://api.github.com/users/brianshumate/repos","events_url":"https://api.github.com/users/brianshumate/events{/privacy}","received_events_url":"https://api.github.com/users/brianshumate/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"mitchellh","id":1299,"avatar_url":"https://avatars.githubusercontent.com/u/1299?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchellh","html_url":"https://github.com/mitchellh","followers_url":"https://api.github.com/users/mitchellh/followers","following_url":"https://api.github.com/users/mitchellh/following{/other_user}","gists_url":"https://api.github.com/users/mitchellh/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchellh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchellh/subscriptions","organizations_url":"https://api.github.com/users/mitchellh/orgs","repos_url":"https://api.github.com/users/mitchellh/repos","events_url":"https://api.github.com/users/mitchellh/events{/privacy}","received_events_url":"https://api.github.com/users/mitchellh/received_events","type":"User","site_admin":false},"assignees":[{"login":"mitchellh","id":1299,"avatar_url":"https://avatars.githubusercontent.com/u/1299?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchellh","html_url":"https://github.com/mitchellh","followers_url":"https://api.github.com/users/mitchellh/followers","following_url":"https://api.github.com/users/mitchellh/following{/other_user}","gists_url":"https://api.github.com/users/mitchellh/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchellh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchellh/subscriptions","organizations_url":"https://api.github.com/users/mitchellh/orgs","repos_url":"https://api.github.com/users/mitchellh/repos","events_url":"https://api.github.com/users/mitchellh/events{/privacy}","received_events_url":"https://api.github.com/users/mitchellh/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-10-17T17:36:29Z","updated_at":"2016-10-20T21:58:41Z","closed_at":"2016-10-19T17:07:02Z","body":"### HCL Template\r\n```hcl\r\n## Port mapping \r\nport_map {\r\ntcp_1988 = 1988\r\ntcp_8888 = 8888\r\ntcp_8989 = 8989\r\nstats =\r\n}\r\n```\r\n\r\n### Expected behavior\r\nError parsing job file due to an empty map element\r\n\r\n### Actual behavior\r\n\r\nError parsing job file does actually occur when the empty `stats` element is the *first one* in the map, but does not occur when it is the last element in the map as shown in the above example.\r\n\r\n### Steps to reproduce\r\n1. Create a job file in HCL\r\n2. Place a map in the job file like the example with an empty element\r\n3. Observe the output of validation (in my case using `nomad validate example.hcl`) with the empty map element in starting and ending positions\r\n"},"comment":{"url":"https://api.github.com/repos/hashicorp/hcl/issues/comments/255240079","html_url":"https://github.com/hashicorp/hcl/issues/158#issuecomment-255240079","issue_url":"https://api.github.com/repos/hashicorp/hcl/issues/158","id":255240079,"user":{"login":"achilu","id":16357875,"avatar_url":"https://avatars.githubusercontent.com/u/16357875?v=3","gravatar_id":"","url":"https://api.github.com/users/achilu","html_url":"https://github.com/achilu","followers_url":"https://api.github.com/users/achilu/followers","following_url":"https://api.github.com/users/achilu/following{/other_user}","gists_url":"https://api.github.com/users/achilu/gists{/gist_id}","starred_url":"https://api.github.com/users/achilu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achilu/subscriptions","organizations_url":"https://api.github.com/users/achilu/orgs","repos_url":"https://api.github.com/users/achilu/repos","events_url":"https://api.github.com/users/achilu/events{/privacy}","received_events_url":"https://api.github.com/users/achilu/received_events","type":"User","site_admin":false},"created_at":"2016-10-20T21:58:41Z","updated_at":"2016-10-20T21:58:41Z","body":"thanks @brianshumate "}}
{"actor":{"display_login":"achilu"}}