jaison
jaison copied to clipboard
Suggestion: catchAll for extra data
I've seen parsers that allow a catch-all field to be created (in this case of type JSON_Value or Table(string, JSON_Value)) where unknown fields get put. That might be a nifty feature to have here too as it allows for gradual extension more easily.
E.g.
Thing :: struct {
id: int;
name: string;
anythingElse: Table(string, JSON_Value); @JsonRest
};
Open to suggestions on if the catch-all field should be @noted or matched by convention or whatever.