Skip to content

Commit

Permalink
Actualize lenient mode documentation (#2568)
Browse files Browse the repository at this point in the history
Because after #2440 quoted boolean values are allowed by default, and
quoted numbers were allowed even before that.
  • Loading branch information
sandwwraith committed Feb 16, 2024
1 parent ab64422 commit 5b28d33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ It gives the following nice result:
### Lenient parsing

By default, [Json] parser enforces various JSON restrictions to be as specification-compliant as possible
(see [RFC-4627]). Particularly, keys must be quoted, while literals must be unquoted. Those restrictions can be relaxed with
(see [RFC-4627]). Particularly, keys and string literals must be quoted. Those restrictions can be relaxed with
the [isLenient][JsonBuilder.isLenient] property. With `isLenient = true`, you can parse quite freely-formatted data:

```kotlin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,10 @@ public class JsonBuilder internal constructor(json: Json) {

/**
* Removes JSON specification restriction (RFC-4627) and makes parser
* more liberal to the malformed input. In lenient mode quoted boolean literals,
* and unquoted string literals are allowed.
* more liberal to the malformed input. In lenient mode, unquoted JSON keys and string values are allowed.
*
* Its relaxations can be expanded in the future, so that lenient parser becomes even more
* permissive to invalid value in the input, replacing them with defaults.
* permissive to invalid values in the input.
*
* `false` by default.
*/
Expand Down

0 comments on commit 5b28d33

Please sign in to comment.