Skip to content

v0.9.6

Compare
Choose a tag to compare
@dtolnay dtolnay released this 11 Feb 00:35
· 1387 commits to master since this release
v0.9.6
426255b
  • Allow mutable square-bracket indexing into a serde_json::Value (#249)

    let mut data = json!({ "x": 0 });
    
    // replace an existing key
    data["x"] = json!(1);
    
    // insert a new key
    data["y"] = json!([false, false, false]);
    
    // replace an array value
    data["y"][0] = json!(true);
    
    // inserted a deeply nested key
    data["a"]["b"]["c"]["d"] = json!(true);