{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/etcd/issues/5993","repository_url":"https://api.github.com/repos/coreos/etcd","labels_url":"https://api.github.com/repos/coreos/etcd/issues/5993/labels{/name}","comments_url":"https://api.github.com/repos/coreos/etcd/issues/5993/comments","events_url":"https://api.github.com/repos/coreos/etcd/issues/5993/events","html_url":"https://github.com/coreos/etcd/issues/5993","id":166398358,"number":5993,"title":"etcdctl not honoring --output json and responding with plain text for ls command","user":{"login":"jlamillan","id":13613687,"avatar_url":"https://avatars.githubusercontent.com/u/13613687?v=3","gravatar_id":"","url":"https://api.github.com/users/jlamillan","html_url":"https://github.com/jlamillan","followers_url":"https://api.github.com/users/jlamillan/followers","following_url":"https://api.github.com/users/jlamillan/following{/other_user}","gists_url":"https://api.github.com/users/jlamillan/gists{/gist_id}","starred_url":"https://api.github.com/users/jlamillan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlamillan/subscriptions","organizations_url":"https://api.github.com/users/jlamillan/orgs","repos_url":"https://api.github.com/users/jlamillan/repos","events_url":"https://api.github.com/users/jlamillan/events{/privacy}","received_events_url":"https://api.github.com/users/jlamillan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-19T18:13:55Z","updated_at":"2016-07-19T18:34:45Z","closed_at":null,"body":"The global etcdctl option, `--output json` isn't being honored in the `etcdctl ls` operation. This is inconsistent with the etcd REST API and obviously not the expected format if `--output json` was specified.\r\n\r\nFor example,:\r\n`$ etcdctl --output json ls`\r\n`/fooDir\r\n/baz\r\n/foo1\r\n/foo3\r\n/new\r\n/foo\r\n/myDir\r\n/newkey`\r\n\r\nDoing the same thing using the REST API and curl:\r\n`$ curl -X GET http://localhost:2379/v2/keys/?quorum=false&recursive=false&sorted=false`\r\n`{\"action\":\"get\",\"node\":{\"dir\":true,\"nodes\":[{\"key\":\"/myDir\",\"dir\":true,\"modifiedIndex\":7,\"createdIndex\":7},{\"key\":\"/newkey\",\"value\":\"value\",\"modifiedIndex\":9,\"createdIndex\":9},{\"key\":\"/foo\",\"dir\":true,\"modifiedIndex\":35,\"createdIndex\":35},{\"key\":\"/foo1\",\"value\":\"bar\",\"modifiedIndex\":47,\"createdIndex\":47},{\"key\":\"/foo3\",\"value\":\"ba2\",\"modifiedIndex\":33,\"createdIndex\":33},{\"key\":\"/new\",\"value\":\"bar\",\"modifiedIndex\":15,\"createdIndex\":15},{\"key\":\"/fooDir\",\"dir\":true,\"modifiedIndex\":51,\"createdIndex\":51},{\"key\":\"/baz\",\"value\":\"bar\",\"modifiedIndex\":14,\"createdIndex\":14}]}}`"},"comment":{"url":"https://api.github.com/repos/coreos/etcd/issues/comments/233725167","html_url":"https://github.com/coreos/etcd/issues/5993#issuecomment-233725167","issue_url":"https://api.github.com/repos/coreos/etcd/issues/5993","id":233725167,"user":{"login":"jlamillan","id":13613687,"avatar_url":"https://avatars.githubusercontent.com/u/13613687?v=3","gravatar_id":"","url":"https://api.github.com/users/jlamillan","html_url":"https://github.com/jlamillan","followers_url":"https://api.github.com/users/jlamillan/followers","following_url":"https://api.github.com/users/jlamillan/following{/other_user}","gists_url":"https://api.github.com/users/jlamillan/gists{/gist_id}","starred_url":"https://api.github.com/users/jlamillan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlamillan/subscriptions","organizations_url":"https://api.github.com/users/jlamillan/orgs","repos_url":"https://api.github.com/users/jlamillan/repos","events_url":"https://api.github.com/users/jlamillan/events{/privacy}","received_events_url":"https://api.github.com/users/jlamillan/received_events","type":"User","site_admin":false},"created_at":"2016-07-19T18:34:45Z","updated_at":"2016-07-19T18:34:45Z","body":"Sure, I'll submit a pull request when I get a chance...."}}
{"actor":{"display_login":"jlamillan"}}