mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
parent
f2c281eadf
commit
a66c4c9340
2 changed files with 12 additions and 2 deletions
10
vlib/json/tests/json_decode_arr_ref_test.v
Normal file
10
vlib/json/tests/json_decode_arr_ref_test.v
Normal file
|
@ -0,0 +1,10 @@
|
|||
import json
|
||||
|
||||
struct Test {
|
||||
a string
|
||||
}
|
||||
|
||||
fn test_main() {
|
||||
x := json.decode([]&Test, '[{"a":"a"}]') or { exit(1) }
|
||||
assert x[0].a == 'a'
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue