v/vlib/x/json2/tests/encode_option_test.v
2025-09-02 20:33:22 +02:00

13 lines
217 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 == '{"cty":null,"alg":"HS256","typ":"JWT"}'
}