Closed chaitanya9186 closed 6 years ago
does it possible to modify EmitDefaults per Service in runtime.NewServeMux ?
i have compat api and new api. In compat i need to EmitDefaults: true, but in new - not
@vtolstov No, I'm afraid you'll have to create a separate ServeMux with the other settings and register your service to that ServeMux instead.
thanks, but how to deal with two different ServeMux in one http.Server ?
https://github.com/mennanov/fieldmask-utils this is works fine
Closing this as OP seems inactive.
If you set your marshaller to not EmitDefaults, and then return the zero value of that field, it will not be included in the returned JSON.
This begs the question though, what are you trying to do here?