Skip to content

Add .json5 to json Lexer#1224

Merged
alecthomas merged 1 commit intoalecthomas:masterfrom
silverwind:patch-5
Feb 27, 2026
Merged

Add .json5 to json Lexer#1224
alecthomas merged 1 commit intoalecthomas:masterfrom
silverwind:patch-5

Conversation

@silverwind
Copy link
Contributor

@silverwind silverwind commented Feb 27, 2026

Technically the JSON lexer is not ideal for json5 but I observe many people writing valid json or jsonc into .json5 files (random example) so I think it's worth adding it. Here is a rendering of a JSON5 file with all features:

image

Technically the JSON lexer is not really good for json5 but I observe many people writing valid JSON into files with this extension so I think it's worth adding it here until proper support can be added.
@alecthomas alecthomas merged commit 10daf04 into alecthomas:master Feb 27, 2026
2 checks passed
@silverwind silverwind deleted the patch-5 branch February 27, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants