News for hackers. Stuff that matters.
Re:Decoding JSON sum types in Go without panicking by timewizard on Wednesday March 19, 2025 @10:13PM (#43419315)
> malformed JSON structs of hacking BAD data structure/logic design

The real world is not particularly well structured.

> a business form in paper

There are several types of paper forms. They're typically differentiated by a type identifier (a.k.a. Title) in their headers. Scaling one layer out paper forms themselves are actually a "sum type." They have a common form factor which makes them useful but require an initial blind examination to understand the context of the rest of the document.

There are no comments on this comment yet.