mkideal/cli

Wish: YAML support

suntong opened this issue · 4 comments

Hi 仕晋,

Hope you will consider adding YAML support as the config file format. I know it is almost 98% like json, however the difference is significant in expressiveness to me. E.g., please take a look at the following same info represented in YAML and json:

foo: "bar"
baz: 
  - "qux"
  - "quxx"
corge: null
grault: 1
garply: true
waldo: "false"
fred: "undefined"
emptyArray: []
emptyObject: {}
emptyString: ""
{
  "foo": "bar",
  "baz": [
    "qux",
    "quxx"
  ],
  "corge": null,
  "grault": 1,
  "garply": true,
  "waldo": "false",
  "fred": "undefined",
  "emptyArray": [],
  "emptyObject": {},
  "emptyString": ""
}

I had almost wanted to give up YAML and use json as the config file format, but once I started doing it, I realize it is going backward in expressiveness.

Please consider.

Thanks

Hmm..., never mind. I decided to split my configuration into two, for running the program itself (using json), and anything else (use YAML).

So you can put it in very very low priority. :-)

So seay to add YAML support, but external package needed.

Yeah, indeed, somebody may not like the idea of extra external package.

So, again, you can put it in very very low priority.

closing it as I don't think it is necessary now -- CLI now is perfect already.