Skip to Content
Skip to content
Go
Why Unexported Go Struct Fields Stay Empty in encoding/json Level: Beginner

Fix Go structs that decode to zero values in json.Unmarshal and catch misspelled JSON keys with DisallowUnknownFields.

Go
Test a Go net/http Handler Without Starting a Server Level: Beginner

Use net/http/httptest to send JSON requests, check status codes, and test validation paths in memory. After this, you can test HTTP handlers in milliseconds without opening a port.