diff --git a/vlib/json/json_decode_anon_struct_test.v b/vlib/json/json_decode_anon_struct_test.v new file mode 100644 index 00000000000000..fc20b70a3fc182 --- /dev/null +++ b/vlib/json/json_decode_anon_struct_test.v @@ -0,0 +1,9 @@ +import json + +fn test_main() { + json_text := '{ "a": "b" }' + b := json.decode(struct { + a string + }, json_text)!.a + assert dump(b) == 'b' +}