mirror of
https://github.com/vlang/v.git
synced 2025-09-08 06:41:58 -04:00
17 lines
208 B
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
|
|
}
|