microsoft/Terminal

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

Open

#11 545 ouverte le 20 oct. 2021

Voir sur GitHub
 (7 commentaires) (0 réactions) (0 assignés)C++ (3 212 forks)batch import
Area-SettingsHelp WantedIssue-BugProduct-TerminalResolution-External

Métriques du dépôt

Stars
 (35 764 stars)
Métriques de merge PR
 (Merge moyen 27j 19h) (24 PRs mergées en 30 j)

Description

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.

Guide contributeur