Hacker News new | ask | show | jobs
by CamouflagedKiwi 1594 days ago
What you describe for JSON is already the case in Go; the stdlib json parser does simply throw out any extra fields on deserialisation.
1 comments

In fact it's difficult-to-impossible to get the opposite (only json.Decoder supports a strict mode, and as soon as one intermediate type implements UnmarshalJSON it stops getting propagated).