Hi John If you look at the source code, you will notice that the User struct they have makes use of a custom MarshallJSON method, which accepts ForceSendFields (as defined inside the User type)
So what you might need to do, is add that "Suspended" into that slice and it will marshall it to JSON See: https://play.golang.org/p/TY-hFUlYewL Silviu On Saturday, 25 August 2018 23:20:09 UTC-4, John More wrote: > > I am using the "google.golang.org/api/admin/directory/v1" to access a G > Suite account and everything seems to work EXCEPT: > The import defines a User structure that includes the following element > among many others > Suspended bool <https://godoc.org/builtin#bool> > `json:"suspended,omitempty"` > > When set to false the json.Marshal treats this as an empty field which > will not allow me to reactivate a user. > Calling the API directly without using the library is not an option as I > am using a service account which means I have to use a JWT and I really > have no idea how to get the Bearer token. > Copying the user struct from the library generates a lot of compiler > dependency errors > > If anyone has run into this before.. workarounds or clues are appreciated > > Thanks > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.