killercup / quicli

Quickly build cool CLI apps in Rust.
https://killercup.github.io/quicli/
Apache License 2.0
541 stars 31 forks source link

Add serde_json? #14

Open killercup opened 6 years ago

killercup commented 6 years ago

We already have serde and serde-derive, it might make sense to be able to read/write JSON as well.

killercup commented 6 years ago

I tried re-exporting the json! macro using the json_internal! macro but that could not be found for some reason (even though serde-json clearly macro_exports it).

moosingin3space commented 6 years ago

Use case: something like Docker CLI where you take JSON-formatted input or produce JSON-formatted output.

killercup commented 6 years ago

Let's ask a different question: What can we add in quicli that would make a typical CLI thing that involves JSON more comfortable/easy so it is superior to just extern crate serde_json?

acheronfail commented 6 years ago

Hmm I'm not sure supporting serde_json is the best idea. Including serde and serde_derive I think is good, but what if the cli app just needs serde_yaml or toml? IMO probably better to leave including different serde_* implementations to each cli app.