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