{"action":"closed","issue":{"url":"https://api.github.com/repos/ChrisCates/rethink-config/issues/4","repository_url":"https://api.github.com/repos/ChrisCates/rethink-config","labels_url":"https://api.github.com/repos/ChrisCates/rethink-config/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/ChrisCates/rethink-config/issues/4/comments","events_url":"https://api.github.com/repos/ChrisCates/rethink-config/issues/4/events","html_url":"https://github.com/ChrisCates/rethink-config/issues/4","id":167075495,"number":4,"title":"passing options to create commands","user":{"login":"kav","id":216737,"avatar_url":"https://avatars.githubusercontent.com/u/216737?v=3","gravatar_id":"","url":"https://api.github.com/users/kav","html_url":"https://github.com/kav","followers_url":"https://api.github.com/users/kav/followers","following_url":"https://api.github.com/users/kav/following{/other_user}","gists_url":"https://api.github.com/users/kav/gists{/gist_id}","starred_url":"https://api.github.com/users/kav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kav/subscriptions","organizations_url":"https://api.github.com/users/kav/orgs","repos_url":"https://api.github.com/users/kav/repos","events_url":"https://api.github.com/users/kav/events{/privacy}","received_events_url":"https://api.github.com/users/kav/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-22T15:49:13Z","updated_at":"2016-07-25T02:58:56Z","closed_at":"2016-07-25T02:58:56Z","body":"Starting to play with options passing. I've got:\r\n```JSON\r\n{\r\n  \"database\": \"peak\",\r\n  \"tables\": [\r\n    \"table\",\r\n    {\r\n      \"otherTable\": {\r\n        \"primaryKey\": \"otherTableImportantNumber\"\r\n      }\r\n    },\r\n    \"oneMoreTable\"\r\n  ]\r\n}\r\n```\r\nin YAML\r\n```YAML\r\ndatabase: peak\r\ntables:\r\n- table\r\n- otherTable:\r\n  primaryKey: otherTableImportantNumber\r\n- oneMoreTable\r\n```\r\nOr as an alternative\r\n```JSON\r\n{\r\n  \"database\": \"peak\",\r\n  \"tables\": [\r\n    \"table\",\r\n    {\r\n      \"name\": \"otherTable\",\r\n      \"primaryKey\": \"otherTableImportantNumber\"\r\n    },\r\n    \"oneMoreTable\"\r\n  ]\r\n}\r\n```\r\nin YAML\r\n```YAML\r\ndatabase: \"peak\"\r\ntables: \r\n- \"table\"\r\n- \r\n  name: \"otherTable\"\r\n  primaryKey: \"otherTableImportantNumber\"\r\n- \"oneMoreTable\"\r\n\r\n```\r\n\r\nI think I prefer the second case in JSON and the first in YAML. I'm inclined to go with the second if only because it prevents some strange edge cases. E.g. what happens when you have two root keys in the object, is that two different tables with configuration?\r\n\r\nWill PR this shortly, just trying to be public as I work out my thinking"}}
{"actor":{"display_login":"ChrisCates"}}