Skip to content

Identifiers get serialized without raw ident escape #322

@torkleyy

Description

@torkleyy

Minimal example:

#[derive(Debug, Deserialize, PartialEq, Serialize)]
#[serde(rename_all = "kebab-case")]
struct MyStructWithDash {
    will_be_renamed: u32,
}

#[test]
fn roundtrip_ident_with_dash() {
    let value = MyStructWithDash {
        will_be_renamed: 32
    };

    let serial = ron::ser::to_string(&value).unwrap();

    println!("Serialized: {}", serial);

    let deserial = ron::de::from_str(&serial);

    assert_eq!(Ok(value), deserial);
}

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions