mirror of
https://github.com/vlang/v.git
synced 2025-08-04 10:17:22 -04:00
10 lines
140 B
V
10 lines
140 B
V
import json
|
|
|
|
fn test_main() {
|
|
json_text := '{ "a": "b" }'
|
|
b := json.decode(struct {
|
|
a string
|
|
}, json_text)!.a
|
|
assert dump(b) == 'b'
|
|
}
|