Skip to content
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

Add warning to RawValue docs regarding untagged enums #704

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/raw.rs
Expand Up @@ -23,6 +23,8 @@ use serde::ser::{Serialize, SerializeStruct, Serializer};
/// `RawValue` is only available if serde\_json is built with the `"raw_value"`
/// feature.
///
/// For [technical reasons](https://github.com/serde-rs/json/issues/497), `RawValue` can't be used with untagged enums at the moment. Trying to deserialize to an untagged enum with `RawValue`, therefore, always fails with an error.
///
/// ```toml
/// [dependencies]
/// serde_json = { version = "1.0", features = ["raw_value"] }
Expand Down