Skip to content

Commit

Permalink
Add support for JSONC (JSON with comments) (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Mar 22, 2024
1 parent 494beda commit 9f1860e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
1 change: 1 addition & 0 deletions LANGUAGES.md
Expand Up @@ -130,6 +130,7 @@ JavaServer Pages (jsp)
Jenkins Buildfile (jenkinsfile)
Jinja (jinja,j2,jinja2)
JSON (json)
JSONC (jsonc)
JSONL (jsonl)
JSX (jsx)
Julia (jl)
Expand Down
9 changes: 9 additions & 0 deletions examples/language/jsonc.jsonc
@@ -0,0 +1,9 @@
// Line comment
{
/*
* Multi
* Line
* Comment
*/
"text": "JSON with comments"
}
25 changes: 23 additions & 2 deletions languages.json
Expand Up @@ -3598,6 +3598,27 @@
"multi_line": [],
"quotes": []
},
"JSONC": {
"complexitychecks": [],
"extensions": [
"jsonc"
],
"line_comment": [
"//"
],
"multi_line": [
[
"/*",
"*/"
]
],
"quotes": [
{
"end": "\"",
"start": "\""
}
]
},
"JSONL": {
"complexitychecks": [],
"extensions": [
Expand Down Expand Up @@ -6304,15 +6325,15 @@
"=== "
],
"extensions": [
"res",
"res",
"resi"
],
"line_comment": [
"//"
],
"multi_line": [
[
"/*",
"/*",
"*/"
]
],
Expand Down

0 comments on commit 9f1860e

Please sign in to comment.