Skip to content

Add serde_norway as that seems more maintained #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ default = ["indexmap", "yaml"]
indexmap = ["dep:indexmap"]
yml = ["dep:serde_yml"]
yaml = ["dep:serde_yaml"]
norway = ["dep:serde_norway"]


[dependencies]
Expand All @@ -26,6 +27,7 @@ indexmap = { version = "2.2", features = ["serde"], optional = true }
serde = { version = "1.0", features = ["derive"] }
serde_yaml = { version = "=0.9.33", optional = true }
serde_yml = { version = "0.0.12", optional = true }
serde_norway = { version = "0.9.42", optional = true }

[dev-dependencies]
glob = "0.3"
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ use derive_builder::*;
#[cfg(feature = "indexmap")]
use indexmap::IndexMap;
use serde::{Deserialize, Deserializer, Serialize};
#[cfg(feature = "norway")]
use serde_norway as serde_yaml;
#[cfg(feature = "yml")]
use serde_yml as serde_yaml;

#[cfg(not(feature = "indexmap"))]
use std::collections::HashMap;
use std::convert::TryFrom;
Expand Down
4 changes: 3 additions & 1 deletion tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#[cfg(all(feature = "norway", not(feature = "yaml"), not(feature = "yml")))]
use serde_norway::from_str;
#[cfg(feature = "yaml")]
use serde_yaml::from_str;
#[cfg(all(feature = "yml", not(feature = "yaml")))]
#[cfg(all(feature = "yml", not(feature = "yaml"), not(feature = "norway")))]
use serde_yml::from_str;

#[test]
Expand Down