[DAEMON-115] appcd: config command should maybe return object when --json
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2017-11-15T23:34:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Appc Daemon 1.0.0 |
Components | appcd, appcd-config-service |
Labels | n/a |
Reporter | Chris Barber |
Assignee | Ewan Harris |
Created | 2017-10-28T04:59:07.000+0000 |
Updated | 2017-11-15T23:34:32.000+0000 |
Description
When the
--json
flag is passed to appcd config
, the response should always be a JSON object that contains a status code along with either a result value or an error message.
I'm not sure this is a good idea. While it is JavaScript/Node friendly, it's not very Unix-y.
[~cbarber] Would the standard output i.e. non\-
\-\-json
not be good enough for people wanting to pipe stuff between commands? I'm guessing the main consumers of the config command with--json
would be internal tooling? (I would expect Studio to use websockets as opposed to spawning processes). I think a json response with a response value and appropriate (and documented) error code would be usefulhttps://github.com/appcelerator/appc-daemon/pull/148