v/vlib/json/tests/json_decode_option_alias_field_test.v

17 lines
208 B
V

module main
import json
struct Req {
height ?int
width ?i32
}
const payload = '{}'
fn test_main() {
r := json.decode(Req, payload) or { panic(err) }
assert r.height == none
assert r.width == none
}