Skip to content

Skipping deserializing  #294

Closed
Closed
@anfractuosity

Description

@anfractuosity

With the following I get an unknown field error:

#[derive(Serialize, Deserialize, Debug)] 
struct Point { 
    x: i32, 
    y: i32, 

    #[serde(skip_deserializing)] 
    z: Option<Arc<Mutex<i32>>>, 
} 
src/main.rs:17:13: 17:31 error: unknown serde field attribute `skip_deserializing`
src/main.rs:17     #[serde(skip_deserializing)]

Just wondering why that is?

I'm using the latest Rust nightly and the following in Cargo.toml

[dependencies]
serde = "*"
serde_json = "*"
serde_macros = "*"

cheers
Chris

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions