Skip to content

Commit 9ffa0a4

Browse files
committed
Clarify question regarding parsers that support trailing commas
1 parent d9bf045 commit 9ffa0a4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

trailingcommas.markdown

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ The reason why this specification chose the default behavior of the parser as th
1313

1414
The exclusion of trailing commas also facilitates the creation of tools and libraries that can parse JSONC without needing to handle additional syntax variations. This helps ensure that JSONC remains a lightweight and straightforward extension of JSON, primarily focused on adding comments without introducing significant complexity.
1515

16-
## Can a Parser Choose to Support Trailing Commas?
16+
## Can a Parser That Chooses to Support Trailing Commas Still Be Considered a JSONC Parser?
1717

18-
Yes, a parser can choose to support trailing commas in JSONC files for convenience. This is especially useful in configuration files or code where lists and objects are frequently edited. Allowing trailing commas can make adding, removing, or reordering items easier and reduce the likelihood of syntax errors.
19-
20-
However, this is not part of the official JSONC specification and such support would be considered an extension or variation of the standard JSONC format. This means that while a parser may allow trailing commas, it may not be compatible with all JSONC parsers or tools that strictly adhere to the JSONC specification without trailing commas.
18+
Yes, however this is not part of the official JSONC specification and such support would be considered an extension or variation of the standard JSONC format. This means that while a parser may allow trailing commas, it may not be compatible with all JSONC parsers or tools that strictly adhere to the JSONC specification without trailing commas.
2119

2220
## Trailing Commas in VS Code
2321

0 commit comments

Comments
 (0)