1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/json/json_encode_sumtype_test.v
2023-04-22 10:58:01 +03:00

14 lines
187 B
V

import json
struct Test {
optional_sumtype ?MySumtype
}
type MySumtype = int | string
fn test_simple() {
test := Test{}
encoded := json.encode(test)
assert dump(encoded) == '{}'
}