- Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
right now, this fails:
use serde::Deserialize; use crate::from_str; #[derive(Debug, Clone, Deserialize, Serialize, PartialEq)] #[serde(rename_all="snake_case")] enum SomeEnum{ VariantA(String), VariantB, } #[derive(Debug, Clone, Deserialize, Serialize)] struct SomeStruct { some_enum: SomeEnum } let json5 = r#"{some_enum: "variant_b" }"#; let parsed: SomeStruct = from_str(json5).unwrap(); assert_eq!(parsed.some_enum, SomeEnum::VariantB);
This should work as it does in serde_json
Right now, we only consider Identifier
s and JSONObject
s (and only identifiers within JSONObjects) this should at least also consider strings, too.
Metadata
Metadata
Assignees
Labels
No labels