Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v
/
vlib
/
json
/
tests
/
json_decode_with_encode_arg_test.v
12
lines
·
10
sloc
·
182 bytes
·
8ebbacecd60366ac4ba68aa35f9b0e7a0e56ff61
Raw
1
import
json
2
3
struct
TodoDto {
4
foo int
5
}
6
7
fn
test_decode_with_encode_arg() {
8
body := TodoDto{}
9
ret := json.decode(TodoDto, json.encode(body))!
10
println(ret)
11
assert ret.foo == 0
12
}
13