Json Marshal/Unmarshal would not work with bool value with omitempty. false is treated as empty and gets omitted in the final output. We also want to keep the fields optional to make sure ease of use.
Use pointer to get correct output. https://stackoverflow.com/questions/37756236/json-golang-boolean-omitempty
Json Marshal/Unmarshal would not work with bool value with
omitempty
.false
is treated as empty and gets omitted in the final output. We also want to keep the fields optional to make sure ease of use. Use pointer to get correct output. https://stackoverflow.com/questions/37756236/json-golang-boolean-omitempty