valid-property-identifier-character
Overview
This rule belongs to the json-validation
ruleset and states that:
A property of JSON is identified uniquely with a key, which must use valid characters only.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Blocking |
Message | JSON data is invalid as a property key/identifier uses an invalid character. |
Code | JSON_V002 |
Type | Validation |
Rule System | Syntax |
Broad Category | JSON Property Key |
Tags | json data preliminary checks validation json property key identifier |
Suggested Fixes
- If key name is unquoted, it must not contain any special characters that can require escaping e.g. '-', '/', '\', '_', '.', ',' etc.
- Try enclosing key name in double quotation marks if you have not already.
- Remove any misplaced/extra content (like a trailing comma) that might be present before or after the key name.