https://bugs.kde.org/show_bug.cgi?id=481038

            Bug ID: 481038
           Summary: Feature request: kate seems to be missing a non-strict
                    JSON highlighting that shows less false positive
                    errors
    Classification: Applications
           Product: kate
           Version: 23.08.4
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: wishlist
          Priority: NOR
         Component: part
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: e...@horse64.org
  Target Milestone: ---

SUMMARY

kate seems to be missing a non-strict JSON highlighting. It seems to be pretty
common nowadays for various applications to support and use JSON with more
lenient rules, the most common one I've seen allowing both `"` and `'` for
strings, allowing `//` line and `/*` block comments, and allowing trailing
comments in array lists and object maps. Some applications like VS Code give
this a different name like "JSON with Comments" and sometimes use a different
file ending like .jsonc but often they don't. I believe even VS Code uses files
with this lenient JSON sometimes named .json for various things.

These files are currently a bit jarring to edit in kate because so much will be
littered with bold red error markers. It would be nice if it were possible to
turn that off. For example by providing "JSON (lenient)" and "JSON (strict)"
variants in the "Markup" highlighting menu.

Personally, I think maybe the non-strict mode should even be the default, but I
know you tend to be vary with changes of defaults. But I think having it cover
more actual real world use cases without making too narrow assumptions, even if
it leads to less useful error displays for some users unless manually changed
to strict mode, makes slightly more sense.

STEPS TO REPRODUCE

1. Open a JSON file with comments
2. All the comments are marked red as errors
3. Try to find some way of fixing that

OBSERVED RESULT

There's only strict JSON highlighting, no lenient variant.

EXPECTED RESULT

There's a lenient JSON highlighting available, maybe even the default.


SOFTWARE/OS VERSIONS

Windows: 
macOS: 
Linux/KDE Plasma: openSUE Slowroll
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.10

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to