microsoft/Terminal

JSON fails to parse with a trailing comment at the end of an array

Offen

#11.545 geöffnet am 20.10.2021

 (7 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C++ (9.275 Forks)batch import
Area-SettingsHelp WantedIssue-BugProduct-TerminalResolution-External

Repository-Metriken

Stars
 (103.173 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 27T 19h) (24 gemergte PRs in 30 T)

Beschreibung

Windows Terminal version (or Windows build number)

1.10.2714.0

Other Software

No response

Steps to reproduce

In the settings file, put a comment at the end of an object with a comma after it.

This fails:

"actions": [
  {},
  // ...
],

Dropping either the , or the comment makes it work.

Expected Behavior

Should be parsed as usual since both terminating commas and comments are allowed, or forbid trailing commas (assuming that comments are a desired feature).

Actual Behavior

Settings could not be loaded from file. Check for syntax errors, including trailing commas.

Contributor Guide