Settings returns "SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data" #10740

Closed
opened 2026-01-31 02:28:58 +00:00 by claunia · 5 comments
Owner

Originally created by @marinsteve on GitHub (Sep 24, 2020).

Environment

Windows build number: Version 10.0.19041.508
Windows Terminal version :1.3.2651.0

Any other software?
Firefox 81 (default file association with json)

Steps to reproduce

Install 1.3.2651.0, from Microsoft Store. Launch, and click Settings.

Expected behavior

Display of the default auto-generated settings.json file.

Actual behavior

Firefox displays:
in JSON tab: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
in Raw Data tab, the ordinary default settings.json file appears
Screenshots:
error
rawdata

Note: deleting the settings.json file causes terminal to regenerate the unparsable json file

Originally created by @marinsteve on GitHub (Sep 24, 2020). # Environment Windows build number: Version 10.0.19041.508 Windows Terminal version :1.3.2651.0 Any other software? Firefox 81 (default file association with json) # Steps to reproduce Install 1.3.2651.0, from Microsoft Store. Launch, and click Settings. # Expected behavior Display of the default auto-generated settings.json file. # Actual behavior Firefox displays: in JSON tab: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data in Raw Data tab, the ordinary default settings.json file appears Screenshots: ![error](https://user-images.githubusercontent.com/5280804/94088338-1a4f2300-fdc5-11ea-9106-a1a78ecafc0f.jpg) ![rawdata](https://user-images.githubusercontent.com/5280804/94088447-600beb80-fdc5-11ea-9121-e1a2fb5fc68e.jpg) Note: deleting the settings.json file causes terminal to regenerate the unparsable json file
claunia added the Issue-QuestionNeeds-Tag-FixResolution-Answered labels 2026-01-31 02:28:59 +00:00
Author
Owner

@j4james commented on GitHub (Sep 24, 2020):

The settings file format isn't pure JSON - it's a superset of JSON that allows for comments. Since Firefox is expecting the content to be pure JSON, it identifies the comment on the first line as a syntax error.

@j4james commented on GitHub (Sep 24, 2020): The settings file format isn't pure JSON - it's a superset of JSON that allows for comments. Since Firefox is expecting the content to be pure JSON, it identifies the comment on the first line as a syntax error.
Author
Owner

@marinsteve commented on GitHub (Sep 25, 2020):

Thanks. I'll killed the comments by editing it in vim, and it works.

@marinsteve commented on GitHub (Sep 25, 2020): Thanks. I'll killed the comments by editing it in vim, and it works.
Author
Owner

@DHowett commented on GitHub (Sep 25, 2020):

Sorry -- I meant to click the text box (not "Close", though that's coming)

Firefox isn't really a suitable JSON editor -- what're you trying to do with it?

If it's your default association for JSON files, that's going to pose a problem for actually editing them! 😄

@DHowett commented on GitHub (Sep 25, 2020): Sorry -- I meant to click the text box (not "Close", though that's coming) Firefox isn't really a suitable JSON editor -- what're you trying to do with it? If it's your default association for JSON files, that's going to pose a problem for actually editing them! :smile:
Author
Owner

@marinsteve commented on GitHub (Sep 25, 2020):

I didn't explicitly choose Firefox as the association for json. I'm not
sure how it got set that way. I've fixed it to be associated with vim,
which does a good job, even though it flags //comments. At least it lets
me write comments, and save json files that work.

Thanks for finding a weird one.

@marinsteve commented on GitHub (Sep 25, 2020): I didn't explicitly choose Firefox as the association for json. I'm not sure how it got set that way. I've fixed it to be associated with vim, which does a good job, even though it flags //comments. At least it lets me write comments, and save json files that work. Thanks for finding a weird one.
Author
Owner

@DHowett commented on GitHub (Sep 25, 2020):

I'm quite surprised about that! We'll hopefully address this better with #1564 (the settings UI)... 😄 Some day soon . . .

I'll close this one out as question/answered for now. Thanks for flagging us down!

@DHowett commented on GitHub (Sep 25, 2020): I'm quite surprised about that! We'll hopefully address this better with #1564 (the settings UI)... :smile: Some day soon . . . I'll close this one out as question/answered for now. Thanks for flagging us down!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10740