Good day,
I’m on the lookout for a strategy to retain null values despatched from a REST API server in JSON. At present, I’m utilizing a struct and unmarshal however this turns Nulls into zeros.
Does anybody have a fast code instance or hyperlink to a superb video on this? I attempted with pointers however I’m not understanding the way it helps, I nonetheless see zeros.
kind foo struct {
Foo *int `json:"foo"`
}
3 Likes
Might you make clear what you imply by “I would like my nulls”? Are you referring to:
Null values** in a database or spreadsheet?
Nullish coalescing (??
)** in programming (like JavaScript)?
One thing associated to a information import/export, API, or JSON?
Or are you utilizing “nulls” in a special context (gaming, analytics, and so on.)
Refrence web site https://petdoubts.com/