Actually fully test deserializing structs
This commit is contained in:
parent
77a10caf34
commit
88631b57cb
4
json.rs
4
json.rs
@ -3000,15 +3000,15 @@ mod tests {
|
||||
fn test_decode_struct() {
|
||||
let s = "{
|
||||
\"inner\": [
|
||||
{ \"a\": null, \"b\": 2, \"c\": [\"abc\", \"xyz\"] }
|
||||
]
|
||||
}";
|
||||
//{ \"a\": null, \"b\": 2, \"c\": [\"abc\", \"xyz\"] }
|
||||
let v: Outer = from_iter(s.chars()).unwrap();
|
||||
assert_eq!(
|
||||
v,
|
||||
Outer {
|
||||
inner: vec![
|
||||
//Inner { a: (), b: 2, c: vec!["abc".to_strbuf(), "xyz".to_strbuf()] }
|
||||
Inner { a: (), b: 2, c: vec!["abc".to_strbuf(), "xyz".to_strbuf()] }
|
||||
]
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user