kelseyhightower / terminus

Get facts about a Linux system.
MIT License
362 stars 29 forks source link

More idiomatic JSON #4

Open jabley opened 9 years ago

jabley commented 9 years ago

Explicitly define the key names in the JSON output.

There was some conversation on Twitter about this. I suggest it would be good to make explicit choices about key names and avoid letting Go defaults leak into the serialisation format.

kelseyhightower commented 9 years ago

@jabley I'm a bit fan of struct tags, but there is a UX problem here. Using struct tags means the users sees the lowercase key names, but when using the format flags, the user must use camelCase.