JsonSyntaxHighlighter
Highlights JSON text: keys, strings, numbers, true, false, null, brackets and the section labels of a job view.
| Declared in | src/libs/libwidgets/widgets/JsonSyntaxHighlighter.hpp |
| Inherits | QSyntaxHighlighter |
| Group | widgets |
Detailed description
The colors come from the syntax colors of the current SemanticPalette. A key is a quoted string followed by a colon. A quoted string with no colon after it is a value. The labels Input:, Result: and Error: at the start of a line get the heading color, so a view that shows the input and the result of a job in one document can separate them.
The highlighter applies each rule to one line at a time and keeps no block state, so a string that spans two lines is not highlighted.
See also YamlSyntaxHighlighter.