Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
Signed-off-by: chirsz-ever <[email protected]>
  • Loading branch information
chirsz-ever committed Jan 23, 2025
1 parent 629ab1e commit 9cc35a4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/mkdocs/docs/features/comments_and_trailing_commas.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This library does not support comments and trailing commas *by default*. It does
3. It is dangerous for interoperability if some libraries would add comment support while others don't. Please check [The Harmful Consequences of the Robustness Principle](https://tools.ietf.org/html/draft-iab-protocol-maintenance-01) on this.

However, you can set parameter `ignore_comments` to `#!cpp true` in the `parse` function to ignore `//` or `/* */` comments. Comments will then be treated as whitespace.
However, you can set parameter `ignore_comments` to `#!cpp true` in the [`parse`](../api/basic_json/parse.md) function to ignore `//` or `/* */` comments. Comments will then be treated as whitespace.

You can also set parameter `ignore_trailing_commas` to `#!cpp true` to ignore trailing commas. Note that a single comma as the only content of the array or object (`[,]` or `{,}`) is not allowed, and multiple trailing commas (`[1,,]`) are not allowed either.

Expand Down Expand Up @@ -72,4 +72,3 @@ For more information, see [JWCC](https://nigeltao.github.io/blog/2021/json-with-
```
--8<-- "examples/trailing_commas.output"
```

0 comments on commit 9cc35a4

Please sign in to comment.