microsoft/Terminal

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

オープン

#11,545 opened on 2021/10/20

 (7 件のコメント) (0 件のリアクション) (0 人の担当者)C++ (9,275 件のフォーク)batch import
Area-SettingsHelp WantedIssue-BugProduct-TerminalResolution-External

Repository metrics

Stars
 (103,173 個のスター)
PR merge metrics
 (平均マージ 27d 19h) (30d で 24 merged PRs)

説明

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.

コントリビューターガイド