valid-syntax-for-closing-json-token
Overview
This rule belongs to the json-validation ruleset and states that:
Ever JSON token has its own syntax for indicating the start and end of that token e.g. a JSON object must start and end with curly braces { and } respectively. Similarly, an array token must start and end with square braces [ and ] respectively. Multiple tokens are separated by a comma.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Blocking |
| Message | JSON data is invalid as an unexpected token was encountered for closing value of the current JSON entity or token. |
| Code | JSON_V204 |
| Type | Validation |
| Rule System | Syntax |
| Broad Category | JSON Start/End |
| Tags | json data preliminary checks validation json token close end braces square braces curly braces |
Suggested Fixes
- Ensure that the opening/closing braces are not missing.
- An array item must start and end with square brackets [ and ] and array values will be separated by a comma ','.
- An object value must start and end with curly brackets { and }. An array of object values must start and end with square brackets [ and ]. The object values in the array must start and end with curly braces { and } and will be separated by a comma ','.