Often, it comes in handy to quickly reformat a JSON file (or XML or Protobuf) to make it readable for the human eye. Maybe this could be solved in a generic way to make it easy to integrate other external formatter programs (similar to Projects > Code Analysis). A bonus would be to auto-detect suitable formatters for the currently opened file and present those first in the list. See also https://bugs.kde.org/show_bug.cgi?id=325807 ("Add C++ Source Code Formatting with clang-format")
I think this should be done via the upcoming External Tools.
One tool would be xmllint --format file.xml
Tools->External Tools->Tools->XML Format Full File is available in 19.12.2. -> RESOLVED