diff --git a/serde_valid/Cargo.toml b/serde_valid/Cargo.toml index 3ecaf158..82771a58 100644 --- a/serde_valid/Cargo.toml +++ b/serde_valid/Cargo.toml @@ -21,7 +21,7 @@ once_cell = "^1.7" paste = { workspace = true } regex = { workspace = true } serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true, optional = true } +serde_json = { workspace = true } serde_toml = { package = "toml", version = "^0.8", optional = true } serde_valid_derive = { version = "0.18.0", path = "../serde_valid_derive" } serde_valid_literal = { version = "0.18.0", path = "../serde_valid_literal" } @@ -34,8 +34,7 @@ intl-memoizer = "0.5" unic-langid = "0.9" [features] -default = ["i128", "json"] -json = ["serde_json"] +default = ["i128"] toml = ["serde_toml"] yaml = ["serde_yaml"] i128 = ["num-traits/i128", "indexmap/std", "serde_valid_literal/i128"] diff --git a/serde_valid/src/features.rs b/serde_valid/src/features.rs index 9039e3cb..928b4a5e 100644 --- a/serde_valid/src/features.rs +++ b/serde_valid/src/features.rs @@ -4,9 +4,6 @@ pub mod flatten; #[cfg(feature = "fluent")] pub mod fluent; -#[cfg(feature = "json")] -pub mod json; - #[cfg(feature = "toml")] pub mod toml; diff --git a/serde_valid/src/features/json.rs b/serde_valid/src/json.rs similarity index 100% rename from serde_valid/src/features/json.rs rename to serde_valid/src/json.rs diff --git a/serde_valid/src/features/json/from_json_reader.rs b/serde_valid/src/json/from_json_reader.rs similarity index 100% rename from serde_valid/src/features/json/from_json_reader.rs rename to serde_valid/src/json/from_json_reader.rs diff --git a/serde_valid/src/features/json/from_json_slice.rs b/serde_valid/src/json/from_json_slice.rs similarity index 100% rename from serde_valid/src/features/json/from_json_slice.rs rename to serde_valid/src/json/from_json_slice.rs diff --git a/serde_valid/src/features/json/from_json_str.rs b/serde_valid/src/json/from_json_str.rs similarity index 100% rename from serde_valid/src/features/json/from_json_str.rs rename to serde_valid/src/json/from_json_str.rs diff --git a/serde_valid/src/features/json/from_json_value.rs b/serde_valid/src/json/from_json_value.rs similarity index 100% rename from serde_valid/src/features/json/from_json_value.rs rename to serde_valid/src/json/from_json_value.rs diff --git a/serde_valid/src/features/json/to_json_string.rs b/serde_valid/src/json/to_json_string.rs similarity index 100% rename from serde_valid/src/features/json/to_json_string.rs rename to serde_valid/src/json/to_json_string.rs diff --git a/serde_valid/src/features/json/to_json_value.rs b/serde_valid/src/json/to_json_value.rs similarity index 100% rename from serde_valid/src/features/json/to_json_value.rs rename to serde_valid/src/json/to_json_value.rs diff --git a/serde_valid/src/features/json/to_json_writer.rs b/serde_valid/src/json/to_json_writer.rs similarity index 100% rename from serde_valid/src/features/json/to_json_writer.rs rename to serde_valid/src/json/to_json_writer.rs diff --git a/serde_valid/src/lib.rs b/serde_valid/src/lib.rs index cc8e53a2..46df01cd 100644 --- a/serde_valid/src/lib.rs +++ b/serde_valid/src/lib.rs @@ -578,6 +578,7 @@ pub mod error; mod features; +pub mod json; mod traits; pub mod validation;