Hacker News new | ask | show | jobs
by dewey 2954 days ago
You're welcome.

1) What do you mean exactly? The usual way would be to keep your data in a struct like:

  type configuration struct {
    Name   string `json:"name"`
  }
and then marshall it into a json string like: https://play.golang.org/p/uWvwBY4h03n

If you need more details feel free to contact me. Address is in my profile.

1 comments

No, I meant the readability in .json file. Should I care for that anyway?

Also, great website! :D

https://golang.org/pkg/encoding/json/#MarshalIndent if you want to "pretty print" the json output
That's great! :D Thanks!
You don’t have to worry about that and don’t have to manually format it.