Closed maxiride closed 3 years ago
The zero
package types will marshal to zero values in JSON but null in SQL.
For example a blank zero.String
will be considered null, and JSON marshal as ""
.
The
zero
package types will marshal to zero values in JSON but null in SQL. For example a blankzero.String
will be considered null, and JSON marshal as""
.
Sorry I must have made confusion in the phrasing but thanks for the clarification!
By the way awesome package!
From the documentation I understand that types are either fully treated as zero or null values in Go and JSON.
I am trying to understand if I can use null values in Go but have them encoded to zero in JSON.