JSON: Zero vs Missing Values

preview_player
Показать описание

In the full presentation:
- High-level overview of serialization
- Go’s encoding/json API
- Marshal custom types
- Streaming
- Security

00:00 Zero vs Missing Values
01:29 Pointers
02:13 mapstructure
04:37 Defaults

----

Other Links:
Рекомендации по теме
Комментарии
Автор

Inside the package time we can read:
"The zero value of type Time is January 1, year 1, UTC. As this time is unlikely to come up in practice, the IsZero method gives a simple way of detecting a time that has not been initialized explicitly."

So maybe using the zero value is not that bad after all 🙂

oussamajr