vaidik / commentjson

Add JavaScript or Python style comments in JSON.
MIT License
104 stars 25 forks source link

Feature request: Ignore trailing commas #39

Closed pvarin closed 4 years ago

pvarin commented 4 years ago

A common workflow of mine is to comment/uncomment items in a JSON file. This fails if I comment out the last item in a list/dictionary because the new last item now has a trailing comma. Is there any appetite for allowing trailing commas? Would a PR that included this functionality get accepted?

vaidik commented 4 years ago

I totally understand that need and it can get really irritating. I personally use python files as configuration files in that case, Gives me more flexibility.

I would be happy to accept changes. The only conflict I have is that this library will start diverging from JSON standard, which was a goal. The only thing I ever wanted to keep here was comments. But may be it's time to let that go.

Go ahead. Send your changes.