v/vlib/json/json_decode_anon_struct_test.v

10 lines
140 B
V

import json
fn test_main() {
json_text := '{ "a": "b" }'
b := json.decode(struct {
a string
}, json_text)!.a
assert dump(b) == 'b'
}