Skip to content

deserialize_str with escaped strings is broken #74

Open
@jordens

Description

@jordens

serde_json_core needs to refuse deserializing a borrowed string with escape sequences.

serde_json_core::from_slice::<&str>(br#""\n""#) incorrectly gives Ok(("\\n", 4)).

serde_json::from_slice::<&str>(br#""\n""#) correctly says Error("invalid type: string \"\\n\", expected a borrowed string", line: 1, column: 4).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions