diff --git a/.gitignore b/.gitignore index 4fffb2f..1070547 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ +.vscode/ + /target /Cargo.lock diff --git a/Cargo.toml b/Cargo.toml index 7a51b75..0672773 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,9 +16,7 @@ exclude = [".github"] [features] - -# We currently don't forward any features to serde_json or serde_path_to_error. -# I'm happy to accept PRs that add support for that. +raw_value = ["serde_json/raw_value"] [dependencies] serde = "1.0.188" diff --git a/src/lib.rs b/src/lib.rs index 6246200..6409ca2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -208,6 +208,9 @@ pub mod value { // See caveats in README.md pub use serde_json::value::Serializer; + #[cfg(feature = "raw_value")] + pub use serde_json::value::{to_raw_value, RawValue}; + use crate::{Error, Result}; /// Convert a `T` into `serde_json::Value` which is an enum that can represent