Skip to content

VIEW001: invalid-json

Resource JSON does not parse

Code VIEW001
Name invalid-json
Category View structure (VIEW)
Default severity error
Enabled by default yes
Fix available no
ign-lint equivalent none

Reports resource files (view.json, style.json, config.json, tags.json, resource.json, project.json, ...) that are not valid JSON, at the first syntax error.

Arrays and objects nested more than 8,192 levels deep are reported too. Gson parses any depth, but Perspective cannot open such a view: its view loader and property trees recurse and overflow a gateway thread's stack at 1,200 to 3,300 levels (measured on Ignition 8.3.3). iglint does not analyse files nested this deeply.

The gateway cannot load a resource whose JSON does not parse: the view, style class or tag folder silently disappears. Other files still lint, and rules that need the broken file's content stay silent about it instead of guessing.

{
"custom": {
"count": 1,
}
}

Use instead:

{
"custom": {
"count": 1
}
}

ign-lint aborts the whole run on the first invalid file. iglint reports the file and keeps going.


Generated from the rule metadata by iglint generate-docs; iglint rule VIEW001 prints the same page in the terminal. Source: docs/rules/VIEW001.md.