Skip to content

This simple json string is parsed incorrectly (testcase) #136

Closed
@njaard

Description

@njaard

Program:

extern crate json;
fn main() {
    let text = r##"{"no":"w","yes":"q","no":"x"}"##;
    let j = json::parse(text).unwrap();
    println!("{:?}", j["yes"]);
    println!("{:?}", j["no"]);
}

Output:

Short("x")
Null

Expected Output:

Short("q")
Short("x")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions