From 34c4a4b94f5d7d8ab0142d2fd071c56131099ec5 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sun, 15 Sep 2024 16:04:11 -0300 Subject: [PATCH] test --- vlib/json/json_decode_anon_struct_test.v | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 vlib/json/json_decode_anon_struct_test.v 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' +}