2022-04-06 19:34:22 +03:00
|
|
|
import json
|
|
|
|
|
|
|
|
struct TodoDto {
|
|
|
|
foo int
|
|
|
|
}
|
|
|
|
|
|
|
|
fn test_decode_with_encode_arg() ? {
|
|
|
|
body := TodoDto{}
|
2022-05-13 06:56:21 +03:00
|
|
|
ret := json.decode(TodoDto, json.encode(body))?
|
2022-04-06 19:34:22 +03:00
|
|
|
println(ret)
|
|
|
|
assert ret.foo == 0
|
|
|
|
}
|