Page MenuHomePhabricator

Allow comments in JSON
Open, WishlistPublic

Description

There are a lot of json variations and I don't think it would be worthwhile to duplicate them all. But as a practical manner for lint, comments are pretty common in config files. It would be nice if ArcanistJSONLinter had an option to allow them.

Event Timeline

cburroughs raised the priority of this task from to Needs Triage.
cburroughs updated the task description. (Show Details)
cburroughs added projects: Arcanist, libphutil.
cburroughs added subscribers: cburroughs, joshuaspence.

This has come up for discussion before, although I can't remember when/where. Generally, I'm onboard with it.

Seems weird, primarily due to lack of standardization. Would // and # both work? Or only one of them? The decision winds up being kind of arbitrary.

Some crazier options could even include /* */, ;, --, etc.

I think there's a point at which your parsing JavaScript instead of JSON...

joshuaspence renamed this task from (optional) allow json linter to accept comments to Allow comments in JSON.May 23 2015, 12:13 PM
joshuaspence claimed this task.
joshuaspence triaged this task as Wishlist priority.
joshuaspence updated the task description. (Show Details)

I might take a stab at this.

I want to work on this eventually but I haven't had the time.

cburroughs moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Apr 20 2016, 3:56 PM