News for hackers. Stuff that matters.
Re:Show HN: Goyave – Golang Web Framework by sneak on Saturday March 28, 2020 @10:17PM (#22715832)
Please stop using json for config files. Config files that cannot be commented are terrible for maintainability.

Everything that can read json has the ability to read yaml. Please use yaml instead.

Re:Show HN: Goyave – Golang Web Framework by lenkite on Saturday March 28, 2020 @11:56PM (#22716250)
Prefer toml over yaml. Large Yaml files are a nightmare to edit with all the special spacing. JSON might be comment unfriendly but it is easily editable.

They just need to have a version of JSON with comments: JSONC and JSON is good.

Re:Show HN: Goyave – Golang Web Framework by smt88 on Saturday March 28, 2020 @11:57PM (#22716255)
As a heavy YAML user for a while (writing and maintaining Open API Spec files), YAML is also a catastrophe. I should not have to "debug" a config file because some tiny whitespace issue is off.

JSON as config isn't good, but YAML is not a silver bullet.

Re:Show HN: Goyave – Golang Web Framework by haar on Sunday March 29, 2020 @03:45AM (#22717152)
Definitely agree that YAML is not a silver bullet. One thing that I’ve found to improve my YAML editing experience is to use a YAML language server [1] backed by JSON schemas. It provides a real time feedback cycle rather than handing the file off to another program to choke cryptically.

[1] https://github.com/redhat-developer/vscode-yaml/blob/master/...

Re:Show HN: Goyave – Golang Web Framework by SystemGlitch on Sunday March 29, 2020 @05:22AM (#22717507)
I agree that config is quite weak in Goyave. I planned to rework it in a later major version. But I don't want to release breaking changes one by one.
Re:Show HN: Goyave – Golang Web Framework by atraac on Sunday March 29, 2020 @03:52AM (#22717179)
JSON5 supports comments. NET Core has been working with comments inside .json appsettings files for a very long time now.
Re:Show HN: Goyave – Golang Web Framework by sneak on Sunday March 29, 2020 @09:35AM (#22718885)
json5 is a neat idea, but if you’re going to use a serialization format that isn’t json, yaml is the way to go, despite its known minor inconveniences. Everything can read json and yaml. Not much can read json5.
Re:Show HN: Goyave – Golang Web Framework by hombre_fatal on Saturday March 28, 2020 @11:06PM (#22716018)
This is just your arbitrary hobbyhorse opinion about something yet you're saying it with an absoluteness that doesn't make me think you realize that.