jaison icon indicating copy to clipboard operation
jaison copied to clipboard

Suggestion: catchAll for extra data

Open J-Chris-Findlay-RESIDEO opened this issue 1 month ago • 0 comments

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.

J-Chris-Findlay-RESIDEO avatar Nov 12 '25 20:11 J-Chris-Findlay-RESIDEO