On Wed, 22 Dec 2021 23:55:43 -0800 (PST) A JI <a17wahi...@gmail.com> wrote:
> Why, when the object of struct is lowercase. I can't fill it and > convert to JSON ? > > https://go.dev/play/p/WZCvC7M5YAp > Is not the object of struct that affect the output of JSON, but the name of field. If the name of field start with lowercase it will not exported by json.Marshal(). See https://go.dev/blog/json and https://pkg.go.dev/encoding/json#Marshal for more information. -- { "github":"github.com/shuLhan", "site":"kilabit.info" } -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/20220113003820.2d0d2d12%40inspiro.localdomain.
pgpKFovbNwtM7.pgp
Description: OpenPGP digital signature