Use JSON5 For package.json #230
Replies: 3 comments 12 replies
-
Also, supporting JSON5 in |
Beta Was this translation helpful? Give feedback.
-
I think that ship sailed a long time ago. There are thousands of packages in the npm registry that expect to I know JSON5/JSON-C (JSON w/ comments) is gaining traction, with more tools supporting it. Still, those tools usually support it from their inception, so the supporting ecosystem is built around the requirement to parse the But for |
Beta Was this translation helpful? Give feedback.
-
At the very least it would be possible to write |
Beta Was this translation helpful? Give feedback.
-
JSON5 ("JSON for Humans"), includes features such as comments, which have long been desired in
package.json
.If
package.json
adopted JSON5 it would add not only comments, but also a number of minor conveniences (eg. optional trailing commas, optional key quoting, single-quoted strings, etc. ... all just like in JS!) And switching to the new standard would be incredibly simple.See https://json5.org/ for more info.
Beta Was this translation helpful? Give feedback.
All reactions