Gitly
Log in
Register
v
/
vlib
/
json
Raw file
|
12 loc (10 sloc)
|
182 bytes
|
Latest commit hash 992b50219
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
}