Closed ion232 closed 1 year ago
Currently, it's not possible to make the following deserialization with getty-json:
Json:
[0, "zero"]
Zig:
pub const Tuple = union(enum){ integer: i64, string: []u8, }; try json.fromSlice(allocator, []Tuple, s);
Add support for an untagged attribute, so that tagged unions can be serialized as untagged values, and be deserialized from untagged values.
untagged
No response
Problem
Currently, it's not possible to make the following deserialization with getty-json:
Json:
Zig:
Proposal
Add support for an
untagged
attribute, so that tagged unions can be serialized as untagged values, and be deserialized from untagged values.Alternatives
No response
Additional Context
No response