Y
Hacker News
new
|
ask
|
show
|
jobs
by
StavrosK
2142 days ago
Fields are messy because you have to check for nulls, yet JSON keys aren't messy because you have to check for nulls?
1 comments
alanfranz
2138 days ago
All json keys are optional, so you ALWAYS need to check for their presence or absence. Mess exists when some key is nullable and some isn't. Checking for nullability on a key that can never be null isn't extremely elegant.
link
StavrosK
2138 days ago
Why is that a mess? I don't see the difference.
link