Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
x
/
json2
/
tests
/
decode_array_array_test.v
16
lines
·
13
sloc
·
267 bytes
·
cafb69dee2a4969973c911f4a6ffff6243257f3b
Raw
1
module
main
2
3
import
json
4
import
x.json2
5
6
pub
struct
Data {
7
name string
8
data [][]f64
9
}
10
11
fn
test_main() {
12
json_data :=
'{"name":"test","data":[[1,2,3],[4,5,6]]}'
13
info := json.decode(Data, json_data)!
14
info2 := json2.decode[Data](json_data)!
15
assert info == info2
16
}
17