`jsonStrinfify` of nested tagged union
Ziggit
`jsonStrinfify` of nested tagged union
Hi, I’m trying to serialize a tagged union to json. The problem is one of the union fields holds a value to an array of the union itself. And I’m just not sure how to correctly serialize this. Here is the code snippet. The values are defined by the underlying data structure: const Filter = union(enum) { prefix: []const u8, tag: []const u8, object_size_greater_than: usize, object_size_less_than: usize, @"and": []Filter, pub fn jsonStringify(self: *const Filter, jws: an...
0 comments
No comments yet.