Homebridge: Use JSON5 for parsing config.json

Created on 23 Apr 2020  路  3Comments  路  Source: homebridge/homebridge

Before releasing the next version, it would be awesome to use JSON5 to parse the config.json, it would allow use to use comments inside JSON and would easily handle many errors (trailing commas) that currently break homebridge. Could work on a PR if wanted.

enhancement stale

Most helpful comment

Sounds good and it probably makes sense in a UI, but as a plugin developer I would not want my comments to be stripped out by an auto-fix. My main need is to be able to quickly toggle config lines/blocks using comments.

All 3 comments

Hey @mgcrea, thanks for the suggestion. We will look into this. Currently the Homebridge UI config editor already implements this to automatically fix some syntax issues on save, See Config UI X v4.14.0.

Sounds good and it probably makes sense in a UI, but as a plugin developer I would not want my comments to be stripped out by an auto-fix. My main need is to be able to quickly toggle config lines/blocks using comments.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JangoBritt picture JangoBritt  路  3Comments

jeffl78 picture jeffl78  路  4Comments

dcaccount picture dcaccount  路  5Comments

morilm picture morilm  路  6Comments

robertcedwards picture robertcedwards  路  6Comments