1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/x/json2/encode_option_test.v

14 lines
206 B
V

import x.json2
struct JoseHeader {
pub mut:
cty ?string
alg string
typ string = 'JWT'
}
fn test_main() {
res := json2.encode(JoseHeader{ alg: 'HS256' })
assert res == '{"alg":"HS256","typ":"JWT"}'
}