Define & Validate APIsValidation RulesetsData Rulesets

JSON Data Validation

Validation checks performed on provided JSON data to check its conformance to standards.

PropertyValue
Ruleset IDjson-validation
Code prefixJSON_V
TypeValidation
Default severityBlocking
Rule systemSyntax
Rules21

JSON Property Key

CodeRuleSeverityWhat it checks
JSON_V001valid-javascript-property-identifier-characterBlockingA property of JSON is identified uniquely with a key, which must use valid characters only.
JSON_V002valid-property-identifier-characterBlockingA property of JSON is identified uniquely with a key, which must use valid characters only.
JSON_V003complete-property-identifier-nameBlockingA property of JSON is identified uniquely with a key, which must be valid and followed by a property value.
JSON_V004between-property-identifier-name-and-valueBlockingA property of JSON is identified uniquely with a key, which must be followed by a property value. The key and value must be separated by a semi-colon : and nothing else must be present between them.

JSON Property Value

CodeRuleSeverityWhat it checks
JSON_V100valid-property-valueBlockingA JSON property key is followed by a property value which must start and terminate properly, escaped if necessary and quoted if applicable.
JSON_V101valid-numeric-property-valueBlockingA numeric property value does not require quotation marks. However, if the value is not a valid number it should be enclosed in double quotation marks to avoid any issues.
JSON_V102valid-boolean-property-valueBlockingA boolean property value should not be enclosed in quotation marks. The only allowed values are: true, false.
JSON_V103valid-null-property-valueBlockingA nullable property value can use null as its value which should not be enclosed in quotation marks.
JSON_V104valid-date-or-datetime-property-valueBlockingA date or datetime property value must use a valid date-time format in its string representation.
JSON_V105quoted-property-valueBlockingSome property values must be enclosed in double quotation marks and properly escaped to avoid issues.
JSON_V106readable-value-tokenBlockingJSON data must be complete and valid for it be parsed successfully. The property key-value pairs in this JSON data must also be complete and follow syntax standards.
JSON_V107no-extra-content-after-property-valueBlockingJSON data must not contain any extra content after a property key-value pair. The property value must be terminated correctly to be parsed successfully.
JSON_V108escaped-property-valueBlockingA JSON property value must be escaped properly. This means that if any special or restricted characters are used they need to be escaped appropriately.

JSON Start/End

CodeRuleSeverityWhat it checks
JSON_V200complete-json-objectBlockingA JSON object must consist of key-value property pairs which are terminated properly.
JSON_V201complete-unicode-escape-sequenceBlockingA value using Unicode escape sequence must be terminated correctly.
JSON_V202complete-json-dataBlockingJSON data must start and terminate properly. If some part of the data is missing or truncated, JSON parsing will fail.
JSON_V203complete-commentBlockingA comment in a JSON file must be terminated correctly.
JSON_V204valid-syntax-for-closing-json-tokenBlockingEver 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.
JSON_V205no-extra-content-after-json-data-endBlockingOnce the JSON data is complete and terminated, no extra content must be placed after it.

Miscellaneous

CodeRuleSeverityWhat it checks
JSON_V250valid-json-commentBlockingA valid JSON comment must start with double slashes.
JSON_V251valid-jsonBlockingJSON data must follow standards defined in the official JSON specification.

Learn more

On this page