Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
json
/
tests
/
json_decode_anon_struct_test.v
9
lines
·
8
sloc
·
140 bytes
·
8ebbacecd60366ac4ba68aa35f9b0e7a0e56ff61
Raw
1
import
json
2
3
fn
test_main() {
4
json_text :=
'{ "a": "b" }'
5
b := json.decode(
struct
{
6
a string
7
}, json_text)!.a
8
assert dump(b) ==
'b'
9
}
10