← All field notes

dust field note

Reject JSON Keys You Did Not Ask For

Dust Serde strict-key model rejecting an unexpected admin field

Extra JSON keys can hide a server and client mismatch. Add disallowUnrecognizedKeys: true to a Dust Serde model. Decoding then rejects any key that is not a field or alias instead of silently accepting it.

Read the Dust Serde configuration guide.

#Dust #Serde #JSON #CodeGeneration