Webhook: Undocumented YAML support breaks JSON style comments in config file

Created on 5 Dec 2018  路  1Comment  路  Source: adnanh/webhook

I was writing a config file and was getting an error message

couldn't load hooks from file! error converting YAML to JSON: yaml: line 7: did not find expected ',' or ']'

I had commented out a line for testing, but it turns out the // comment was breaking it. Noticing the message about YAML, I tried using # to comment it out instead and everything worked correctly.

It would be nice if the support for YAML was documented (possibly with some examples) because it is much easier to use for manually written configs. It would also be nice if both styles of comments were supported.

documentation enhancement help wanted

Most helpful comment

Ugh, that's why I hate magic in applications :-(

We should definitely improve YAML support, documentation, and make it an explicit option instead of magically loading it and then falling back to JSON if it doesn't work...

Thanks.

>All comments

Ugh, that's why I hate magic in applications :-(

We should definitely improve YAML support, documentation, and make it an explicit option instead of magically loading it and then falling back to JSON if it doesn't work...

Thanks.

Was this page helpful?
0 / 5 - 0 ratings