DataGrip 2023.2 Help

Code Inspections in JSON and JSON5

This topic lists all DataGrip code inspections available in JSON and JSON5.

You can toggle specific inspections or change their severity level on the Editor | Inspections page of the IDE settings Control+Alt+S.

Inspection

Description

Default Severity

Compliance with JSON schema

Reports inconsistence between a JSON file and the JSON schema that is assigned to it.


Warning Warning

Compliance with JSON standard

Reports the following discrepancies of a JSON file with the language specification:

  • A line or block comment (configurable).

  • Multiple top-level values (expect for JSON Lines files, configurable for others).

  • A trailing comma in an object or array (configurable).

  • A single quoted string.

  • A property key is a not a double quoted strings.

  • A NaN or Infinity/-Infinity numeric value as a floating point literal (configurable).

Error Error

Compliance with JSON5 standard

Reports inconsistency with the language specification in a JSON5 file.

Error Error

Deprecated JSON property

Reports a deprecated property in a JSON file.


Note that deprecation mechanism is not defined in the JSON Schema specification yet, and this inspection uses a non-standard extension 'deprecationMessage'.

Weak Warning Weak warning

Duplicate keys in object literals

Reports a duplicate key in an object literal.

Warning Warning

Unknown JSONPath function

Reports an unknown name in a JSONPath function call instead of known standard function names: concat, keys, length, min, max, avg, stddev, sum.

Warning Warning

Unknown JSONPath operator

Reports an unknown operator on a JSONPath expression instead of one of the standard ones: in, nin, subsetof, anyof, noneof, size, empty, contains.

Warning Warning

Unknown property key used for JSONPath evaluate expression

Reports a key in a JSONPath expression that is missing in the source JSON document to evaluate.

Warning Warning

Unresolved '$ref' and '$schema' references

Reports an unresolved $ref or $schema path in a JSON schema.


Warning Warning

Last modified: 21 March 2023