v / vlib / json
Raw file | 12 loc (10 sloc) | 182 bytes | Latest commit hash 992b50219
1import json
2
3struct TodoDto {
4 foo int
5}
6
7fn 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}