Hacker News new | ask | show | jobs
by name_for_now 3378 days ago
You can pass union types to the macro, so that should handle your "varying types" problem. In terms of nesting, I just create another struct with its own JSON.mapping and use that as the type for the field.