Disabled JSON support by default.
This commit is contained in:
parent
6550bd0d96
commit
518303a013
3 changed files with 8 additions and 10 deletions
|
@ -14,7 +14,7 @@ readme = "README.md"
|
||||||
travis-ci = { repository = "aatxe/irc" }
|
travis-ci = { repository = "aatxe/irc" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["ctcp", "json", "toml"]
|
default = ["ctcp", "toml"]
|
||||||
ctcp = []
|
ctcp = []
|
||||||
nochanlists = []
|
nochanlists = []
|
||||||
json = ["serde_json"]
|
json = ["serde_json"]
|
||||||
|
|
10
README.md
10
README.md
|
@ -74,12 +74,10 @@ fn main() {
|
||||||
Like the rest of the IRC crate, configuration is built with flexibility in mind. You can easily
|
Like the rest of the IRC crate, configuration is built with flexibility in mind. You can easily
|
||||||
create `Config` objects programmatically and choose your own methods for handling any saving or
|
create `Config` objects programmatically and choose your own methods for handling any saving or
|
||||||
loading of configuration required. However, for convenience, we've also included the option of
|
loading of configuration required. However, for convenience, we've also included the option of
|
||||||
loading files with `serde` to write configurations. By default, we support JSON and TOML. As of
|
loading files with `serde` to write configurations. The default configuration format is TOML,
|
||||||
0.12.4, TOML is the preferred configuration format. We have bundled a conversion tool as
|
though there is optional support for JSON and YAML via the optional `json` and `yaml` features. All
|
||||||
`convertconf` in the examples. In a future version, we will likely disable JSON by default.
|
the configuration fields are optional, and can thus be omitted, but a working configuration requires
|
||||||
Additionally, you can enable the optional `yaml` feature to get support for YAML as well. All the
|
at least a `server` and `nickname`.
|
||||||
configuration fields are optional, and thus any of them can be omitted (though, omitting a
|
|
||||||
nickname or server will cause the program to fail for obvious reasons).
|
|
||||||
|
|
||||||
Here's an example of a complete configuration in TOML:
|
Here's an example of a complete configuration in TOML:
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
echo "{\"owners\": [\"test\"],\"nickname\": \"test\",\"username\": \"test\",\"realname\": \"test\",\"password\": \"\",\"server\": \"irc.test.net\",\"port\": 6667,\"use_ssl\": false,\"encoding\": \"UTF-8\",\"channels\": [\"#test\", \"#test2\"],\"umodes\": \"+BR\",\"options\": {}}" > client_config.json
|
echo "{\"owners\": [\"test\"],\"nickname\": \"test\",\"username\": \"test\",\"realname\": \"test\",\"password\": \"\",\"server\": \"irc.test.net\",\"port\": 6667,\"use_ssl\": false,\"encoding\": \"UTF-8\",\"channels\": [\"#test\", \"#test2\"],\"umodes\": \"+BR\",\"options\": {}}" > client_config.json
|
||||||
cargo run --example convertconf --features "toml yaml" -- -i client_config.json -o client_config.toml
|
cargo run --example convertconf --features "json yaml" -- -i client_config.json -o client_config.toml
|
||||||
cargo run --example convertconf --features "toml yaml" -- -i client_config.json -o client_config.yaml
|
cargo run --example convertconf --features "json yaml" -- -i client_config.json -o client_config.yaml
|
||||||
|
|
Loading…
Reference in a new issue