Preferences (brackets.json) don't support comments, although defaultPreferences do #13008

Open
ripper234 opened this Issue Dec 26, 2016 · 2 comments

Projects

None yet

2 participants

@ripper234

Description

I'm trying to modify the preferences for Beautify plugin.
The defaultPreferences.json file contains comments:

// Beautifier-Language-Mapping, see https://github.com/brackets-beautify/brackets-beautify#configure-languages
	"bb.beautify.languages": {
		// Default: css
		"css": "css",

		// Default: html
		"ejs": "html",
...

When copy pasting the content of "bb.beautify.languages" into brackets.json in order to modify it, I get

image

This error is resolved when stripping the // comments from the json.

The default file and running file should either both not support comments, or preferably should both support comments.

Versions

Running Release 1.8 build 1.8.0-17108 (alf_localization_release_1.8 3af64fa)
build timestamp: Wed Nov 02 2016 12:07:29 GMT+0000

on Windows.

@petetnt
Member
petetnt commented Dec 27, 2016

Using http://hjson.org/ instead of plain JSON would be one option.

@ripper234
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment