Skip to content

Commit 84b0999

Browse files
authored
Merge pull request #33 from jmtilli/add_caj_for_c
Add CAJ to the set of libraries supporting JSONC as the first C implementation
2 parents 5efcb36 + bb63342 commit 84b0999

1 file changed

Lines changed: 22 additions & 16 deletions

File tree

tools.md

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ Several tools and libraries support JSONC, enabling developers to parse and gene
1111

1212
| Language | Tool/Library | Comments | Trailing Commas | Notes |
1313
|----------- |---------------------------------------------------|----------|-----------------|--------------------------------|
14-
| C++ | [nlohmann/json][nlohmann] | 🟡 [^1] | 🟡 [^2] | |
15-
| C++ | [RapidJSON][rapidjson] | 🟡 [^3] | 🟡 [^4] | |
16-
| C++ | [stephenberry/glaze][glaze] | 🟢 [^5] | 🔴 | |
14+
| C | [jmtilli/caj][CAJ] | 🟡 [^1] | 🟡 [^2] | |
15+
| C++ | [nlohmann/json][nlohmann] | 🟡 [^3] | 🟡 [^4] | |
16+
| C++ | [RapidJSON][rapidjson] | 🟡 [^5] | 🟡 [^6] | |
17+
| C++ | [stephenberry/glaze][glaze] | 🟢 [^7] | 🔴 | |
1718
| Elixir | [massivefermion/jsonc][massivefermion] | 🟢 | 🟢 | Includes additional extensions |
1819
| Go | [HuJSON][hujson] | 🟢 | 🟢 | |
1920
| 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] | |
21+
| Java | [Jackson][Jackson] | 🟡 [^8] | 🟡 [^9] | |
22+
| JavaScript | [microsoft/node-jsonc-parser][msft] | 🟢 | 🟡 [^10] | |
23+
| Kotlin | [kotlinx.serialization.json][kotlinx] | 🟡 [^11] | 🟡 [^12] | |
2324
| PHP | [otar/jsonc][otar] | 🟢 | 🟢 | |
2425
| Python | [n-takumasa/json-with-comments][n-takumasa] | 🟢 | 🟢 | |
2526
| Rust | [dprint/jsonc-parser][dprint] | 🟢 | 🟢 | |
@@ -36,6 +37,7 @@ Legend:
3637
[hujson]: https://github.com/tailscale/hujson
3738
[rapidjson]: https://github.com/Tencent/rapidjson
3839
[nlohmann]: https://github.com/nlohmann/json
40+
[CAJ]: https://github.com/jmtilli/caj
3941
[glaze]: https://github.com/stephenberry/glaze
4042
[tidwall]: https://github.com/tidwall/jsonc
4143
[Jackson]: https://github.com/FasterXML/jackson-core
@@ -47,22 +49,26 @@ Legend:
4749

4850
<hr>
4951

50-
[^1]: Use `ignore_comments`
52+
[^1]: Use `caj_allow_comments(ctx)`
5153

52-
[^2]: Use `ignore_trailing_commas`
54+
[^2]: Use `caj_allow_trailing_comma(ctx)`
5355

54-
[^3]: Use `kParseCommentsFlag`
56+
[^3]: Use `ignore_comments`
5557

56-
[^4]: Use `kParseTrailingCommasFlag`
58+
[^4]: Use `ignore_trailing_commas`
5759

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).
60+
[^5]: Use `kParseCommentsFlag`
5961

60-
[^6]: Use `JsonFactory.enable(JsonReadFeature.ALLOW_JAVA_COMMENTS)`
62+
[^6]: Use `kParseTrailingCommasFlag`
6163

62-
[^7]: Use `JsonFactory.enable(JsonReadFeature.ALLOW_TRAILING_COMMA)`
64+
[^7]: 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).
6365

64-
[^8]: Use `allowTrailingComma: true`
66+
[^8]: Use `JsonFactory.enable(JsonReadFeature.ALLOW_JAVA_COMMENTS)`
6567

66-
[^9]: Use `allowComments`. See [Documentation](https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-builder/allow-comments.html).
68+
[^9]: Use `JsonFactory.enable(JsonReadFeature.ALLOW_TRAILING_COMMA)`
6769

68-
[^10]: Use `allowTrailingComma`. See [Documentation](https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-builder/allow-trailing-comma.html).
70+
[^10]: Use `allowTrailingComma: true`
71+
72+
[^11]: Use `allowComments`. See [Documentation](https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-builder/allow-comments.html).
73+
74+
[^12]: 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)