Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Go
/
Go
An HTTP API must reject misspelled JSON fields instead of silently ignoring them. Which d…
from Go
intermediate
1 min
An HTTP API must reject misspelled JSON fields instead of silently ignoring them. Which decoder setup enforces that contract?
Create a `json.Decoder`, call `DisallowUnknownFields`, then decode.
Use `json.Unmarshal`; it rejects unknown fields by default.
Add `omitempty` to every response field.
Check
Ask AI about this kata
Report an error
previous kata
Name the `http.ResponseWriter` method after which changing ordinary response headers is t…
Fill in
next kata
Which review rule preserves a structured logging contract at an authentication boundary?
Quiz
A new version is available
Reload