Skip to content

Commit fc83d03

Browse files
authored
Merge pull request #30 from JSONC-org/tools
Add seperate Tools and Libraries page
2 parents 2685e12 + 4d50e57 commit fc83d03

2 files changed

Lines changed: 70 additions & 35 deletions

File tree

‎index.md‎

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -120,42 +120,9 @@ For a visual representation of the grammar rules, see the JSONC railroad diagram
120120
- [JSONC Railroad Diagram]({{ '/grammar/railroad-diagram.html' | relative_url }})
121121

122122
## Tools and Libraries
123-
Several tools and libraries support JSONC, enabling developers to parse and generate JSONC data easily.
124123

125-
Here is a non-exhaustive list:
126-
127-
**C++**
128-
- [nlohmann/json](https://github.com/nlohmann/json) `ignore_comments`, `ignore_trailing_commas`
129-
- [RapidJSON](https://github.com/Tencent/rapidjson) `kParseCommentsFlag`, `kParseTrailingCommasFlag`
130-
- [stephenberry/glaze](https://github.com/stephenberry/glaze)
131-
132-
**Elixir**
133-
- [massivefermion/jsonc](https://github.com/massivefermion/jsonc)
134-
135-
**Go**
136-
- [HuJSON](https://github.com/tailscale/hujson)
137-
- [tidwall/jsonc](https://github.com/tidwall/jsonc)
138-
139-
**Java**
140-
- [Jackson](https://github.com/FasterXML/jackson-core) `JsonFactory.enable(JsonReadFeature.ALLOW_JAVA_COMMENTS)`
141-
142-
**JavaScript/TypeScript**:
143-
- [microsoft/node-jsonc-parser](https://github.com/microsoft/node-jsonc-parser)
144-
145-
**Kotlin**
146-
- [kotlinx.serialization.json](https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-builder/allow-comments.html)
147-
148-
**PHP**
149-
- [otar/jsonc](https://github.com/otar/jsonc)
150-
151-
**Python**
152-
- [n-takumasa/json-with-comments](https://github.com/n-takumasa/json-with-comments)
153-
154-
**Rust**
155-
- [dprint/jsonc-parser](https://github.com/dprint/jsonc-parser)
156-
157-
**Swift**
158-
- [steelbrain/JSONCKit](https://github.com/steelbrain/JSONCKit)
124+
For a community-maintained list of JSONC tools and libraries, please refer to the following page:
125+
- [Tools and Libraries]({{ '/tools.html' | relative_url }})
159126

160127
## APPENDIX A: Trailing Commas and JSONC
161128

‎tools.md‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
layout: default
3+
title: JSONC
4+
---
5+
6+
# Tools and Libraries
7+
8+
Several tools and libraries support JSONC, enabling developers to parse and generate JSONC data easily. This is a non-exhaustive list organized by programming language.
9+
10+
## Parsers
11+
12+
| Language | Tool/Library | Comments | Trailing Commas | Notes |
13+
|----------- |---------------------------------------------------|----------|-----------------|--------------------------------|
14+
| C++ | [nlohmann/json][nlohmann] | 🟡 [^1] | 🟡 [^2] | |
15+
| C++ | [RapidJSON][rapidjson] | 🟡 [^3] | 🟡 [^4] | |
16+
| C++ | [stephenberry/glaze][glaze] | 🟢 [^5] | 🔴 | |
17+
| Elixir | [massivefermion/jsonc][massivefermion] | 🟢 | 🟢 | Includes additional extensions |
18+
| Go | [HuJSON][hujson] | 🟢 | 🟢 | |
19+
| Go | [tidwall/jsonc][tidwall] | 🟢 | 🟢 | |
20+
| Java | [Jackson][Jackson] | 🟡 [^6] | 🟡 [^7] | |
21+
| JavaScript | [microsoft/node-jsonc-parser][msft] | 🟢 | 🟡 [^8] | |
22+
| Kotlin | [kotlinx.serialization.json][kotlinx] | 🟡 [^9] | 🟡 [^10] | |
23+
| PHP | [otar/jsonc][otar] | 🟢 | 🟢 | |
24+
| Python | [n-takumasa/json-with-comments][n-takumasa] | 🟢 | 🟢 | |
25+
| Rust | [dprint/jsonc-parser][dprint] | 🟢 | 🟢 | |
26+
| Swift | [steelbrain/JSONCKit][steelbrain] | 🟢 | 🟢 | |
27+
28+
Legend:
29+
30+
🟢: Default support <br>
31+
🟡: Optional support <br>
32+
🔴: Unsupported <br>
33+
34+
[otar]: https://github.com/otar/jsonc
35+
[steelbrain]: https://github.com/steelbrain/JSONCKit
36+
[hujson]: https://github.com/tailscale/hujson
37+
[rapidjson]: https://github.com/Tencent/rapidjson
38+
[nlohmann]: https://github.com/nlohmann/json
39+
[glaze]: https://github.com/stephenberry/glaze
40+
[tidwall]: https://github.com/tidwall/jsonc
41+
[Jackson]: https://github.com/FasterXML/jackson-core
42+
[massivefermion]: https://github.com/massivefermion/jsonc
43+
[msft]: https://github.com/microsoft/node-jsonc-parser
44+
[kotlinx]: https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/
45+
[n-takumasa]: https://github.com/n-takumasa/json-with-comments
46+
[dprint]: https://github.com/dprint/jsonc-parser
47+
48+
<hr>
49+
50+
[^1]: Use `ignore_comments`
51+
52+
[^2]: Use `ignore_trailing_commas`
53+
54+
[^3]: Use `kParseCommentsFlag`
55+
56+
[^4]: Use `kParseTrailingCommasFlag`
57+
58+
[^5]: Use `glz::read_jsonc` (or using options: `glz::opts{.comments = true}`). See [Documentation](https://github.com/stephenberry/glaze/blob/main/docs/json.md#json-with-comments-jsonc).
59+
60+
[^6]: Use `JsonFactory.enable(JsonReadFeature.ALLOW_JAVA_COMMENTS)`
61+
62+
[^7]: Use `JsonFactory.enable(JsonReadFeature.ALLOW_TRAILING_COMMA)`
63+
64+
[^8]: Use `allowTrailingComma: true`
65+
66+
[^9]: Use `allowComments`. See [Documentation](https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-builder/allow-comments.html).
67+
68+
[^10]: Use `allowTrailingComma`. See [Documentation](https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-builder/allow-trailing-comma.html).

0 commit comments

Comments
 (0)