refactor: Introduce json feature and make it optional

Gates support for `serde_json` behind a Cargo feature called `json`
that is enabled by default.
This commit is contained in:
Vincent Ambo 2019-02-26 13:49:43 +01:00
parent 479a6b3442
commit c6c1746428
2 changed files with 18 additions and 7 deletions

View file

@ -3,7 +3,11 @@ name = "crimp"
version = "0.1.0"
authors = ["Vincent Ambo <mail@tazj.in>"]
[features]
default = [ "json" ]
json = [ "serde", "serde_json"]
[dependencies]
curl = "0.4"
serde = "1.0"
serde_json = "1.0"
serde = { version = "1.0", optional = true }
serde_json = { version = "1.0", optional = true }