apache / apache/netbeans

[Theme] More complete example of JSON file for syntax highlighting

Open
#5,066 7 comments 0 reactions 1 assignee Claimed by @noelma View on GitHub
JSON kind:feature needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Description

More complete example of JSON file for syntax highlighting

### Use case/motivation

The example JSON file for syntax highlighting is the one provided by the [json.org](https://json.org/example.html) site.

This example only contains strings, object and array.

```json
{
"glossary": {
"title": "example glossary",
"GlossDiv": {
"title": "S",
"GlossList": {
"GlossEntry": {
"ID": "SGML",
"SortAs": "SGML",
"GlossTerm": "Standard Generalized Markup Language",
"Acronym": "SGML",
"Abbrev": "ISO 8879:1986",
"GlossDef": {
"para": "A meta-markup language, used to create markup languages such as DocBook.",
"GlossSeeAlso": [
"GML",
"XML"
]
},
"GlossSee": "markup"
}
}
}
}
}
```
This is not enough to set syntax highlighting
Can you provide a more complete example like this:

```json
{
"object": {
"array": [
{ "value": "first" },
{ "value": "second" }
],
"bool_false": false,
"bool_true": true,
"char": "a",
"encoding": "\uD83D\uDE10",
'error': 'error',
"exponential": 1E2,
"exponent": 1e2,
"float": 1.0,
"integer": 1,
"null": null,
"regex": "/.HTML/",
"string": "Lorem ipsum",
"url": "http://example.com",
"void": ""
}
}
```
The syntax highlighting example is not intended to represent a real case, but only to help create themes. Real cases are never complete enough

Expected result:
![Capture d’écran du 2022-12-10 10-14-04](https://user-images.githubusercontent.com/10517497/206842840-192d16d2-d7f4-4838-a59f-0fadd586da14.png)

I don't know if adding an error in the example is relevant :man_shrugging:

### Related issues

_No response_

### Are you willing to submit a pull request?

No

### Code of Conduct

Yes

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.